Comments are a powerful form of social proof, and an active comment section is a positive SEO signal to Google.
When the most recent comments appear first it keeps the conversation fresh, stimulates engagement and user activity, and makes your blog appear extra lively and popular.
People are more likely to join in the conversation if they see that the comments are fresh.
However, the default WordPress setting displays the oldest comments first.
In this tutorial, weβre going to show you how to change the order in which comments appear on your website so that the most recent comments appear on top.
The default WordPress setting is to display older comments first
Unless you change the settings, WordPress displays comments in the order they are submitted.
The oldest comments – the first to be submitted – appear at the top, directly under your blog or article.
The newest comments, and likely the most relevant ones, get buried at the bottom. This may discourage new visitors from joining in the conversation and adding their own comments.
Should I display the most recent comments first in WordPress?
It can be very beneficial to change the order to display the newest comments at the top.
It gives you the opportunity to answer questions, interact with prospective customers, and promote yourself, your brand, and your values.
Seeing the old comments at the top can also be confusing – especially if your settings allow threaded (nested) comments.
Weβve all seen cringe-y, out-of-place comments which have been incorrectly βnestedβ under other comments! Thatβs because readers commonly reply to the top comment, not realizing that they should first scroll to the bottom to see whatβs new.
Popular posts donβt age well if the oldest comments appear at the top. No matter how lively the comments section is, if the first comment is older than 6 months, the whole website looks outdated.
How to make the newest comments appear first
There are two quick and easy ways to change the order in which comments appear in WordPress.
Method 1: Change the comment display order via the WordPress settings
This is the simplest method and takes just a few clicks.
Go to the Settings tab in your WordPress Dashboard.
Once you’re there, find the “Other comment settings” section.
Look for the βComments should be displayed with the older comments at the top of each pageβ option. Click on the drop-down menu and select βNewerβ.
Lastly, go to the bottom of the page and click on the βSave Changesβ button.
The change will take effect immediately.
Method 2: Use a code snippet to change the comment display order in WordPress
There may be a situation where youβd rather change the comment display order by adding code to your WordPress site, like when youβre developing a custom WordPress theme and you canβt access the clientβs hosting account.
Adding code snippets is not always a safe thing to do or easy to keep track of when you make a lot of changes.
It’s better to use a plugin like Code Snippets, rather than adding a code snippet into your themeβs functions.php file, so you can manage the change at any time without any risk of losing it during a WordPress update.
Here’s the code snippet you’ll need to apply.
function wpb_reverse_comments($comments) {
// Check order in which comments appear
$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');
In this code, the comments_array
filter is responsible for reversing the comments. No matter what the standard WordPress settings show – this code will override the built-in WordPress settings.
If anyone wants to change the order back to βOldest on topβ they will be unable to change it with Method 1. You will need to first remove this code, and then use the standard settings option described under Method 1.
This possible future problem is a powerful argument for using a code snippet plugin since the presence of one will make it clear to other website admins that you went beyond tweaking the standard settings to make changes to the siteβs code.
Is there a plugin to change the display order?
When we made this change ourselves on WP Mayor, someone on our team raised the question about using a plugin to change the display order of the most recent comments.
There is no such plugin, and no such plugin is needed since there already are two perfectly simple, safe ways to change the comments order without a plugin.
According to our research, many people may ask this question because of other WordPress advice sites which are confusing the issue somewhat with their erroneous recommendations of plugins that have a different function.
The plugins they refer to are actually meant to display the full comment text and other details in a widgets section on your website.
Examples of these are the βRecent Comments Widget Plusβ or βBetter Recent Commentsβ, which have a similar function to WordPressβs more limited but built-in βLatest Posts Gutenberg Blockβ.
In conclusion
Itβs pretty easy to make the newest, most recent comments appear on top and the oldest comments at the bottom, and yet, this small change could have a profound effect on user engagement on your WordPress site.
There may also be powerful reasons for not displaying any comments on your website – especially while youβre still working on your products, additions to the site, or just donβt have a lot of traffic yet.
Head over to our post on how to disable commenting in WordPress to learn more about this option.