This should do the trick, I guess:
$args = array(
'number' => 10,
'order' => 'DESC',
'status' => 'approve',
'parent' => 0
);
$comments = get_comments( $args );
You can find full list of arguments in Codex.
Related Posts:
- Comment Table Size Results in Slow Page Loads and 500 Errors
- Restrict users to see only own comments and the post author’s replies
- WP_Comment_Query() displays “password protected” comments?
- WP_Comment_Query with 5 top level comments per page?
- How would I count the number of times a comment meta field’s value is in a post’s entire comments?
- Get comment content by comment ID
- How to query comments only for the current post?
- List user comments in author page
- How can I get a list of comments by target
- How to get comment images stored as serialized comment meta
- How to make comments private for commentor and post author
- how to SELECT for the current post id?
- Trying to get property of non-object notices in comment-template.php
- Sort post by last commented
- db query for retrieving comments without any reply
- Query comments with non-empty ‘author_url’ value on Admin Comments Screen
- The last comments of a post for the author of that post
- Get approved comments or comments that the author is me
- Commenting in user profile page?
- Reverse comment pagination numbers
- get recent comments of a particular category
- Hook/Filter before and after comments
- Whitelisting Commenters
- Is it possible to move a comment that should be a reply to another comment?
- Can I seperate comments from post?
- Average Score of all ratings in comments
- Making a Comment on a page without being on that page?
- Display commenter’s registration date on comments?
- How do I display the commentor’s first name and last name in the comments?
- show un-approved comments at wordpress front end
- How To Disable Comments On New Page
- What is the server IP comment hack
- How to add consent checkbox in comment section
- How to add pagination to comments?
- Do I have to have a nonce for a custom comment field?
- Get last seen date/time in wordpress get_comments() [closed]
- WP 4.4.1 allow empty comments via add_action ‘pre_comment_on_post’
- How to get replies of a comment?
- Share comment to twitter after publishing [closed]
- changing comment-page-# to something like review-page-#
- Comments deactivated
- Filter custom posts with / without comments
- Create comments.php form of custom HTML code
- Display comments on homepage of twenty seventeen theme
- How to dynamic Heart Like in WordPress?
- Comment Moderation and CDN Caching
- Assign author to comment from post edit page
- The “\” is missing when comments is updated
- warnCommentChanges always being triggered on update
- how get comments only on post of current logged in user?
- How to get comment id in callback function?
- Posting comment returns 404
- How-To and Troubleshooting Canonical Links for Paginated Comments
- Comments offset
- How to hide trackbacks on wp-admin/edit-comments.php
- Using a static callback on wp_insert_comment
- Show comment pop up links as text only
- How to prevent multiple comments
- Displaying comments on pages distinguished by GET IDs
- Is there a hook to update / replace values in the “Enable threaded (nested) comments x levels deep” drop down?
- Update comment meta for all comments of specific post
- How to change comment texts that has a specific comment_ID – Hook into comment
- How do comments work?
- Can’t reply to comments [closed]
- counting trackbacks, pingbacks and comments of a post
- Adding comments section to website integrated WordPress instance
- ask and edit an extra comment field
- Modify links in user comments
- How indicate when a functions was upgraded in relationship to the entire program [closed]
- Empty comments field or
- What templates/funtions needed in custom theme to allow comments the new 3.0 way
- Default Gravatar not showing for pings
- How to filter comments by comment_meta
- Prevent users to delete comments from trash
- How can I hide comment of the authors from their published posts?
- How to customize ‘children comments’ in WordPress?
- How to display replies to his comments in user profile of current user
- Top rated posts Average rating issue
- stop url changing when user comments
- Keep comment author’s name on their comment even when their account is deleted
- How to add a class to comment submit button?
- WordPress Commenting System User access and Security
- Comments.php is not getting called on main blog page
- Allowing comments on author pages
- How can I see whether a commenter has subscribed to be notified of replies / other comments to a post
- WordPress Comments – Only show part of user name
- Where is the Leave a Comment link set
- Broken comments section – WordPress 2014 Theme
- Auto disable comments with custom field
- Need an advice about comments
- I want to fill the comment with the comment count?
- delete user not working
- same comment list for two posts
- Replace do_action() with a normal submit form in comments.php
- How to remove or customize “Comment” in comments form?
- edit-comments.php in Admin – how to change ‘Comments’ title?
- Comments on pages not appearing, even though I enabled them
- check if a comment was made by a registered user
- Stop future commenting on specific post
- How can I filter the user avatar displayed in comments? – get_avatar_url filter works everywhere but not in comments