aman
aman

Reputation: 105

Wordpress Most recent Comments at top with Per page resctriction

I am using roots wordpress framework. I need to show comments of posts in Desc order by posted date , means the most recent shows at top.

If I use this in my commnets.php, it works fine

      wp_list_comments(array('callback' = 'roots_comment','reverse_top_level'=>true,'reverse_children'=>true,'type'=>'comment')); 

But if I try to restrict the number of comments , then it ignores the reverse arguments and shows the comments from bottom.

     wp_list_comments(array('callback' => 'roots_comment','reverse_top_level'=>true,'reverse_children'=>true,'per_page'=>3,'type'=>'comment')); 

Now this one is showing the first 3 comments from bottom(3rd,2nd ,1st ) in this order(means order is correct but it is counting the 3 comments from bottom, rather than the recent 3 submitted ) .

Does anyone know solution to this , apart from changing the core wp-includes/comments-template.php file . I can't do that as it is a multisite , so it will affect the other sites comment order.

Thanks

Upvotes: 0

Views: 565

Answers (1)

maiorano84
maiorano84

Reputation: 11971

You should have an easier time modifying your settings by logging into your Dashboard and checking out Settings->Discussion.

Upvotes: 1

Related Questions