Reverse sort order on comments
-
Someone asked if it’s possible to reverse the sort order on comments.
(https://en.forums.wordpress.com/topic/how-can-i-sort-comments-by-decreasing-date?replies=6)
By adding the following code before
<?php foreach ($comments as $comment) : ?>
in comments.php you will reverse the sort order on the page with ID 42:<?php
if(is_page(’42’)){
$comments = array_reverse($comments);
}
?> -
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for WordPress.com hosted blogs only. If you have a self-hosted WordPress blog you need to seek help at the WordPress.org forums, not here.
If you don’t understand the difference, you may find this information helpful.
-
davidnu, php code cannot be modified on WordPress.com blogs. The advice you have provided would only work for self hosted WordPress.org blogs.
We are working on comment update though. Watch the WordPress.com blog for announcements.
- The topic ‘Reverse sort order on comments’ is closed to new replies.