Ever want to know how to reverse WordPress comments order? By default, WordPress displays comments as first come, first serve, or in order received.
Why would anyone want to put newest comments first? Well, it might make it seem that the conversation is still going, especially if you have an old post that still has evergreen content (or content that has information that is true today.)
How to Reverse WordPress Comments Order
In order to get your most recent comments first, you’re going to have to play with your comments template in your theme’s files. Before editing, please make sure you back up your website.
1. Find your theme template’s comments.php file.
2. Open the comments.php file and look for the following code:
<?php foreach ($comments as $comment) : ?>
3. Add the following line before (above) the code listed in the previous step.
<?php $comments = array_reverse($comments, true); ?>
Save, and check your website to see if comments are now displaying in reverse order.
Leave a Reply