Wednesday, December 10th, 2008 
 Author: Jon B

Reverse The WordPress Comments From Newest To Oldest

If you want to display your comment list from newest to oldest, here is a simple solution, find your functions.php page located in ../wp-content/themes/your-theme-name/ and add the following function:


function reverse_comments($comments,$id) {
$comments = array_reverse($comments);
return $comments;
}
add_filter('comments_array','reverse_comments',10,2);

Voila! Your WordPress comment list should now display from newest to oldest.

Trackback: Trackback-URL | Comments Feed: RSS 2.0
Category: Code, Web Development, WordPress

You can leave a response.

 

  1. 1
    Johann 

    thank you for this post, there’re not alot of people to who’ve added this to there help tutorials and it was so simple, worked like a charm.

    Now all the responses are from newest to oldest, thanks again :)
    Johann´s last blog ..Hosting My ComLuv Profile

  2. 2
    cwxwwwxdfvwwxwx 

    well, hi admin adn people nice forum indeed. how’s life? hope it’s introduce branch ;)

Leave a Reply






Copyright © 2010 | Theme By JBWEBDEV | All Rights Reserved