Free Wordpress Blog Setup

How To Rearrange Comments in WordPress – Display the Most Recent One on Top

By Editorial Staff in Tutorials
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.

Download this Plugin from WordPress Plugin Directory

Free Wordpress Blog Setup

Comments

5 Responses to “How To Rearrange Comments in WordPress – Display the Most Recent One on Top”
  1. Kevin says:

    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.

  2. Stefan Pinto says:

    Will it work with Disqus?

  3. 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”

  4. @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.

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.

Due to high volume of request from our readers, we are adding this feature that allows you to stay updated with this post's comments without having to participate in the discussion even though we would love your input as always. Don't worry we hate SPAM just as much as you do, so you will never receive any SPAM messages from our site and that's our promise to you.

Subscribe without commenting