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
    cwxwwwxdfvwwxwx 
    Wednesday, 24. December 2008

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

Leave a Reply




CommentLuv Enabled



Copyright © 2010 | Theme By JBWEBDEV | All Rights Reserved