See.
http://codex.wordpress.org/Function_Reference/get_comments
Set the orderby parameter to your desired value, possible values are.
comment_agent
comment_approved
comment_author
comment_author_email
comment_author_IP
comment_author_url
comment_content
comment_date
comment_date_gmt
comment_ID
comment_karma
comment_parent
comment_post_ID
comment_type
user_id
Refer to the link already provided for info on setting other parameters, and general examples.
Related Posts:
- How do I comment out a block of tags in XML?
- R: Comment out block of code
- How to rearrange fields in comment_form()
- How do I delete all comments from a specific old blog post?
- Removing the “Website” Field from Comments and Replies?
- How to enable comments for pending and draft posts?
- How to load and show comments with AJAX instead of pagination?
- Comments not appearing at all
- A plugin where users can comment with Facebook or Twitter or OpenID [closed]
- Comment Count for each Comment Author
- Show comments from multiple post IDs in comment template
- Hook/Filter before and after comments
- Comment form validation
- Sticky Comments
- Whitelisting Commenters
- Comments number message in password protected post
- Disable Comments Feed
- Use rich text editor in comments?
- Add a custom class to awating comments
- How to add custom comment fields but *only on the comment reply form*?
- I have tried using Plugins to remove 72K comments with no success
- Show only posts which can be commented
- What should I hook to add extra fields to comments?
- Get a variable field of all comments of current post
- Average Score of all ratings in comments
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, func
- How To Disable Comments On New Page
- How to add pagination to comments?
- Report spam button
- Why do comment moderators need to have all create/edit/delete toboth posts and pages?
- Comment pagination – How to show determined number of comments on the first page?
- Disable comments
- Community Moderation Plugin for Comments [closed]
- Allow contributors to moderate comments comments on posts they write
- How do I really disable comments?
- Why is comments_template() working without a comments.php file?
- Comment form connection to Gravity Forms
- Add classname comment template from functions.php
- Reject Comments Based on Author Email
- Turning off trackbacks & comments
- Create comments.php form of custom HTML code
- Disqus comments and pingback script – how to change the order?
- To whom do emails get sent via the WordPress comments form?
- Delete all one-word comments
- Is it possible to embed github gists in wordpress comments?
- Comments feed – Undefined named entity: ndash
- Using defer or async JavaScript attributes prevents pingbacks and trackbacks from being sent
- Why do I have to manually approve comments from one of my users who already has an approved comment?
- how get comments only on post of current logged in user?
- How to convert WordPress comments to bbPress replies [closed]
- Get declared variable in single.php to work in comments.php without re-declaring it [closed]
- What is causing wp-comments-post.php to redirect to the browser’s IP address?
- Extra Title field for Comments
- comments_number not displaying
- Get comments only for certain specific users in template file
- How to direct user after comment save
- Show comment pop up links as text only
- Insert Ads “into” comments section in Genesis Themework
- WordPress Recent Comments Widget exclude own comments
- How to get comment images stored as serialized comment meta
- Hide comments on specific pages, not just disable future comments
- Update comment meta for all comments of specific post
- How to permanently delete pages I have already trashed?
- Additional content every x comments
- How to display category name from commenter’s custom post
- Add comment_meta to wp_comment_reply
- Adding comments section to website integrated WordPress instance
- How to Define Custom Number of Items in Comment Feed
- What’s the difference with trash_comment and wp_trash_comment?
- How can i change the order of comments?
- infinite loop on page with comments after changing comments.php and header.php
- Default Gravatar not showing for pings
- How include comment and post count of user in this custom query
- Refresh individual comment text via API
- How do I refresh “Post Last Modified Time”, as long as comment is updated to Approve status?
- Disallow Comments
- Need to output comment_form() function inside a foreach loop
- Comment field override
-   not working in comments
- Badges for Guests based on their comment counts [closed]
- Comment section not appearing on posts
- WordPress Comments – Only show part of user name
- Where is the Leave a Comment link set
- Disable comment moderation in multisite
- URLs to user page is broken
- Comments Template shows, but not the comments
- Broken comments section – WordPress 2014 Theme
- Auto disable comments with custom field
- Need an advice about comments
- Force logged in users to provide more data when commenting
- How do I get the comments section to show up?
- By Default, Turn Comments Off for Pages & Leave Comments On for Posts
- same comment list for two posts
- How to remove or customize “Comment” in comments form?
- Getting thousands of spam comments
- edit-comments.php in Admin – how to change ‘Comments’ title?
- 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
- WordPress Editor widgets “comments” and “post comments form” getting disappeared with elementor [closed]