WordPress.org

Ready to get started?Download WordPress

Forums

Comment pagination breaking sort by date (1 post)

  1. flemmo
    Member
    Posted 1 year ago #

    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"

    and

    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() ?>
    </ul>
    
    <div class="comments-pagination">
    <?php paginate_comments_links() ?>
    </div>

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic