...

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

149

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.

Video Tutorial

 

Subscribe to WPBeginner

If you don’t like the video or need more instructions, then continue reading.

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.

Display newer comments on top in WordPress

That’s all, WordPress will now display most recent comments on top.

Alternate Method

If for some reason the default method does not work for you, then you can try this. Simply add this code in your theme’s functions.php file or a site-specific plugin.

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

This code uses the comments_array filter to reverse the display of comments on your WordPress site.

That’s all, we hope this article helped you rearrange comments in WordPress to display the most recent one on top.

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

Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.