Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Reverse the order comments WordPress

  • SOLVED

I make the intalattion this plugin "WP-Commentnavi" to paginate the comments. Ex: http://umafrase.com/frases-de-amor/
I wanted to insert last comment at the top of the first page, and not the top of the last page as the default.
It is possible to change the sort order?

Answers (5)

2012-05-17

Arnav Joy answers:

check this plugin

http://wordpress.org/extend/plugins/simple-reverse-comments/


Jose Ribeiro comments:

Fantastic, this works

2012-05-17

Michael Caputo answers:

In your comments template, where it says:
<?php wp_list_comments(); ?>

You need to add "reverse_top_level=true". So it should look like this:

<?php wp_list_comments('reverse_top_level=true'); ?>


Jose Ribeiro comments:

Thank you, does not work

2012-05-17

Kailey Lampert answers:

There's an option in Settings > Discussion that may work for you. Here's a screenshot of where that option is: http://screencast.com/t/i40NNhvScsf4


Jose Ribeiro comments:

Thank you, does not work

2012-05-17

Francisco Javier Carazo Gil answers:

I would have done that as here:

Just open the comments.php file from your theme. Find the following line:
<?php foreach ($comments as $comment) : ?>
Add this line below:
<?php $comments = array_reverse($comments, true); ?>

The code should look like this the next one:
<?php $comments = array_reverse($comments, true); ?>
<?php foreach ($comments as $comment) : ?>
// comments loop
<?php endforeach; ?>

That's all


Jose Ribeiro comments:

Thank you, does not work

2012-05-17

petrisor Daniel answers:

Just go to Dashboard/ Settings/ Discussion and just edit this:
<blockquote>Comments should be displayed with the <strong>newer</strong> comments at the top of each page</blockquote>
There is a plugin that do exact same thing but i recommend using first method:
http://wordpress.org/extend/plugins/reverse-order-comments/


Jose Ribeiro comments:

Thank you, does not work