• Hi,
    I am trying to display the latest comments first. I have set ‘Break comments into pages with 3 top level comments per page and the first page displayed by default. Comments should be displayed with the newer comments at the top of each page’. But it is not working. Say if I have comments 1 to 10(10 is the latest comments), then comment 3, 2, 1 are showing on the first page, and 6, 5,4 are on the second page, and so on. So comment 10, which is the latest comment is on the last page, not on the first page. It is just the first one on the last page.

Viewing 1 replies (of 1 total)
  • Thread Starter theycallmegosu1982

    (@theycallmegosu1982)

    I just found this solution, by adding this code in functions.php

    if (!function_exists('custom_reverse_comments')) {
        function custom_reverse_comments($comments) {
            return array_reverse($comments);
        }
    }
    add_filter ('comments_array', 'custom_reverse_comments');

Viewing 1 replies (of 1 total)
  • The topic ‘how to display the latest comment first?’ is closed to new replies.