How to Re-arrange Comments in WordPress

How to Re-arrange Comments in WordPress

Rearrange comments to display the latest one on top is becoming a new idea that top bloggers are now implementing it on their site. If your blog site has a lot of user interaction, then I advise this option to be your choice because often the recent comments get buried on the last pages or at the very bottom. In this post, we will show you how you can rearrange your comments and display the most recent one on top.

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. The image below will give you a better understanding of the steps to take if the theory didn’t get you there.

comment

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

Read: How to rearrange links in WordPress Blogroll

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.

If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.

RelatedPost

Also Read  How to Move WordPress to a New Host or Server With No Downtime

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu
×

Cart

Spelling error report

The following text will be sent to our editors: