Support » Fixing WordPress » Comment pagination breaking sort by date

  • flemmo


    Hi all,

    For some reason, when I have pagination turned on, the sort by date is only being performed on that page, not the whole list of comments.

    Here is a sample of what is happening:

    Page 1:
    November 27
    November 26
    November 25
    November 23
    November 23

    Page 2:
    December 3
    November 29
    November 29
    November 28
    November 28

    Page 3:
    December 7
    December 5
    December 5
    December 4
    December 4

    Here’s how I have things set up:

    1) In Admin > Settings > Discussion I have:
    “Break comments into pages with 5 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

    2) In comments.php in my theme I have:

    <ul class="commentlist">
    <?php wp_list_comments() ?>
    <div class="comments-pagination">
    <?php paginate_comments_links() ?>

    I’ve tried passing things like ‘reverse_top_level’ to wp_list_comments(), but again this just effects the current page.

    Where am I going wrong?

  • The topic ‘Comment pagination breaking sort by date’ is closed to new replies.