Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How To Display the Most Recent Comments First in WordPress

Do you want to display the most recent comments on top in WordPress?

By default, WordPress displays older comments first. However, some website owners may want to rearrange comments by displaying the newest comments on top.

In this article, we’ll show you how to easily rearrange comments in WordPress by displaying the most recent comments on top.

Display newer comments on top in WordPress

Why and When to Rearrange WordPress Comments

By default, WordPress displays comments as they are posted. This means oldest comments appear at the top, which gives more exposure to the comments that are submitted first.

Default comment order in WordPress

However, many site owners use comments to boost user engagement. By prominently displaying newer comments first, then can keep the conversation fresh and get more comments on their WordPress blog.

That being said, let’s take a look at how to easily change the comment display order in WordPress by displaying newer comments at top.

1. Display Newer Comments First in WordPress Settings

WordPress comes with a built-in option to rearrange the comment display order on your posts and pages.

Simply go to the Settings » Discussion page. From here, you’ll find the option ‘Comments should be displayed with the older comments at the top of each page’ under the ‘Other comment settings’ section.

New comments first option in WordPress settings

Click on the drop down menu and select Newer. After that, you need to click on the ‘Save Changes’ button at the bottom of the page to store your settings.

That’s all, WordPress will now display the most recent comments on top. You can now visit your website to see newer comments displaying at the top.

New comments displayed on top

2. Manually Set Comment Display Order in WordPress

This method requires you to add code to your WordPress website. If you haven’t done this before, then take a look at our guide on how to easily add custom code snippets in WordPress.

The default method is easier, but there are some scenarios where it may not work for all users.

For instance, let’s say you are working on a custom WordPress theme for a client and want to display new comments on top. However, you don’t have access to client’s WordPress installation or settings page.

In that case, you would want to use the code method instead.

Simply add this code in your theme’s functions.php file or a site-specific plugin.

function wpb_reverse_comments($comments) {
// Check comment order 
$comment_order = get_option('comment_order');

// if comment order is default then change it. 
if ( $comment_order == 'asc' ) {
return array_reverse($comments); 	
add_filter ('comments_array', 'wpb_reverse_comments');

This code first checks the WordPress settings to confirm the comment order.

If the comment order in WordPress is set to the default (older first), then it uses comments_array filter to reverse the display of comments (newer first).

Note: This code will force WordPress to show newer comments first regardless of what option is set in WordPress settings. If you want to revert back to default comment order, then you’ll need to remove this code.

That’s all, we hope this article helped you rearrange comments in WordPress to display the most recent one on top. You may also want to see our guide on how to get a free SSL certificate for your WordPress website, or our expert comparison of the best live chat software for small business.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

21 CommentsLeave a Reply

  1. Thank you for this tip: $comments = array_reverse($comments);
    I tried the admin option of showing newest comments at the top and it didn’t work, but your code worked. Thank you!

  2. I think this is one of the most important info for me. And i’m glad reading your article. But should remark on some general things, The website style is wonderful, the articles is really excellent

  3. I am typically to running a blog and i really respect your content. The article has actually peaks my interest. I’m going to bookmark your web site and maintain checking for new information.I am typically to running a blog and i really respect your content. The article has actually peaks my interest. I’m going to bookmark your web site and maintain checking for new information.

  4. I prefer method 2, it is easier than codes. I hate codes coz I am not good at it. Thanks for the plugin.

  5. @Grace T In your Dashboard, drop down the Plugins list and click Add New. In there you will see a link on top to Upload. Click that and then the Browse button to locate the ZIP file you downloaded. Then click Install Now.

    You may be prompted for your FTP login details. If you are, enter it and click the Proceed button. The next page will show 2 links: Activate Plugin and Return to Plugins page. Click Activate Plugin to start using it now.

  6. I downloaded the plugin, but I’m really not great with technology, so how do you activate it? This sounds like a stupid question, but I really need help!

  7. @Jim Hutchinson: That discussion settings stuff doesn’t work at all.

    @Editorial Staff: It would have been better if you just said replace with .
    I had to go to the wordpress forum to find this solution.

  8. A plugin is not needed for this. Just go into the Discussion Settings and select how you want the comments to show, older or newer.

    “Comments should be displayed with the [older][newer] comments at the top of each page”

  9. I am having a custom WordPress theme developed by someone from and I would like to know whether or not I’ll be able to install plugins such as Simple Reverse Comments because my theme is custom. Can you shed light on this? Maybe I should cut my losses and go with something like the Thesis theme which is more cookie-cutter? Thank you for your blog, it has been very helpful to me.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.