You should be able to start your function with global $post;
. Then, your $args
would look like this:
$args = array(
'post_id' => $post->ID,
'order' => 'ASC'
);
Related Posts:
- Is it possible to pull comments from facebook into your blog?
- Enable Submit Comment Without Page Reload (Using Ajax)?
- Getting Post Comments for post ID using WP_Query() and a Custom Loop?
- How to deal with small scale comment spam on small commercial sites? [closed]
- How to use a custom comments template
- Comment visibility
- human_time_diff() returns “48 years ago” for all comments
- Allowing more elements in comments via functions.php
- Set post comments open function
- “Categories” for comments?
- Why are default comments deprecated?
- Comments Reply Form
- Allow guests comments on single post
- Delayed commenting
- An action hook where a comment meta is updated
- Display number of comment replies
- Last comment page first with full number of comments?
- Only subscriber role user can comment not other
- Strategies for coping with hyperagressive spambots?
- Relaxing unescaped HTML filtering inside tags?
- How to save new comment as custom comment type?
- How to remove the “on” string before recent comments link?
- WordPress comments email notification for authors
- How to get the result of comments_number() as a string instead of printing it out?
- Should I still worry about paginated comments with the latest wordpress versions?
- WordPress unresponsive after calling wp_update_comment()
- How to dont allow registered users to comment without being logged in?
- How can I edit the Twenty Ten Theme to remove the comments box when a page uses a specific template?
- Highlight Author Comments issues
- wp_insert_comment and security
- How can someone submit a comment when my site has no comment field?
- Show comments in a popup
- Is WordPress vulnerable to “comment posting forgery”?
- Author can only see own post comment and can moderate
- highlight “starred” comments by admin
- How to display html in only the first level of WP comments?
- How can I edit comment notification email content?
- your comment awaiting moderation message sometimes not appearing
- How can I hide the IP of registered commentators?
- How to configure WordPress + plugins to support these commenting features
- Comments vs. Pingbacks next page issue
- WordPress ‘comment counts’ got messed up, because of a plugin – DISQUS
- blank page after submitting a comment
- Remove post navigation links
- Comments invisible after moving WordPress to new server, while commenting still works
- Display only 1 comment and then option to show more
- Allow the comment author to delete their own comments
- cancel reply link results in 404 error
- Spammers attacking my WordPress Site – Removing URL field from core? [closed]
- Prioritizing the wordpress comments
- Which filter/hook to use for styling comments?
- How should I get the original comment while processing the reply
- Comments from vbulletin topic [closed]
- wp.getComments is returning nill, when i called from my iphone app [closed]
- How to override wp_insert_comment()
- I wish to remove, disable or hide the comment authors’ links to their sites from my home page
- custom hooks before a comment is updated/edited in the database
- How to stop ultimate members to redirect comment authors to user profile?
- How can I get list of emails of users who commented on a post?
- How modify the comment content persistently based on $wp_query?
- Displaying Posts Depending on Number of Comments and Latest Comments?
- How do I stop the comments going to my email?
- How to implement just the wp commenting area on my custom site?
- anyone can help me to know whats going wrong? [closed]
- How to hide wordpress post comment form for specific role
- How to customize the title from comments form?
- How to display comment meta under each comment content
- Get comment id of the individual comments in comment list when modifying comment posted using comment text filter
- Comments and post dates not showing up correctly on “posts page”
- get_comment_meta not behaving as expected
- comments_popup_link() – how to load different classes/images according to different comment condition?
- Comments numbering on multiple pages
- How do I get a array, with the right order of the nested comments?
- Problem with comment box
- Display last comments on home page
- Permalink structure and dedicated comment pages
- Clicking Comment “Reply” Button only replies to first comment
- Is there a way to only allow certain user ranks to comment on a post
- comment form code redirect to wp_comments_post.php with blank page
- Parent comment’s author display_name
- How to show a list of comments on home page from all posts?
- WordPress Custom Local Avatar not showing in comments
- Create another comment section for WordPress
- Subcriber getting multiiple notifications for new comments
- Limit Comment Line Count – Add Read More Button
- Comments/Discussion Not enabled on newly created posts/pages
- Commenter username copies author username
- How can I enable commenting from mobile view?
- Displaying comment rating stars in carousel
- Enable comments option
- How to force users to nest their comments
- WordPress Comments jQuery Doesn’t submit
- Insert comment and still use moderation
- Auto approve all comments (editor)
- add field comment [duplicate]
- Let users comment on categories in WordPress
- Customize comment notification e-mails with HTML
- How to disable comments on new blog post, but allow on new products?
- Query comments with non-empty ‘author_url’ value on Admin Comments Screen
- Customize the new comment notifications sent to the post author after the comment is approved