How To Rearrange Comments in WordPress – Display the Most Recent One on Top
Rearranging comments to display the latest one on top is becoming a new trend that more and more top bloggers are implementing on their site. If your blog has a lot of user interaction, then this option should be your choice because often the recent comments get buried on the last pages or at the very bottom. In this article we will show you how you can rearrange your comments and display the most recent one on top.
There are multiple ways that have been shared online and some even require you to edit your core files. Editing core files is never a good option because every time you upgrade WordPress, you have to make that change again. We have two ways that you can use to rearrange comments and display them in the descending order showing the most recent comment first that will not require you to change the core files at all.
Method 1
This method requires you to add a simple code to your comments.php. First you need to find the line:
foreach ($comments as $comment) {
Note: These may vary slightly in different themes. Immediately before this line you need to add:
add $comments = array_reverse($comments);
With the reverse function, you can rearrange comments and show them in the descending order.
Source: Demonboy
Method 2
The second method makes the job even easier for those who are not good with codes. It is a plugin called Simple Reverse Comments. With this plugin, you do not have to edit any template files at all. Simply download the plugin and activate it.
Comments
5 Responses to “How To Rearrange Comments in WordPress – Display the Most Recent One on Top”Share Your Opinions
Tell us what you're thinking...
and if you want a pic to show with your comment, then get gravatar!
Please make sure that you have read our Comment Policy.








I am having a custom WordPress theme developed by someone from elance.com 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.
You should be able to install this plugin in your custom theme.
Will it work with Disqus?
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”
@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.