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.

Add the following code in your functions.php file

function wpb_reverse_comments($comments) {
  return array_reverse($comments);
 } 
add_filter ('comments_array', 'wpb_reverse_comments');

The Default Method

Simply go to Settings » Discussion.

Under the Other comment settings, you will find the option, Comments should be displayed with the older comments at the top of each page. 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.








Related Post


Latest Post


Recent Posts Widget

Make sure to never miss a thing...

Get the latest news from the creative industry along with other creative goodies, conveniently delivered to social media.