In many cases the blogger may want to sort the comment of there WordPress blog by latest comment at top, like me.
Instead of installing any plugin, i have done following code changes in “comments.php“.
Somewhere in “comments.php“, you will find below line of code –
foreach ($comments as $comment) :
Add following code just above the for loop
$comments = array_reverse($comments);
so, the final code will become
<?php /*Start By Jitendra*/ $comments = array_reverse($comments); /*End By Jitendra*/ foreach ($comments as $comment) : ?>
I hope, this little trick will be very useful for few WordPress bloggers.
Leave a Reply