The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Reverse Comment Order in twenty-ten? (3 posts)

  1. sepp88
    Posted 5 years ago #

    hey guys,
    I wonder how i can reverse the comment-order of a page-template in my current twenty-ten theme. i found a few solutions of various blogs to reverse the order with a simple php reverse(array) function. however, the twenty-ten theme works with


    any ideas how to do that?

  2. One way would be to make a separate comments template.

    comments_template('/comments-reverse.php', true );

    Then make a copy of comments.php into comments-reverse.php. In the comments-reverse.php file, find this line:
    wp_list_comments( array( 'callback' => 'twentyten_comment' ) );

    And change it to this:
    wp_list_comments( array( 'callback' => 'twentyten_comment', 'reverse_top_level' => true ) );

    Naturally, I'd recommend doing this in a child theme. The twenty-ten theme gets overwritten during upgrades.

  3. sepp88
    Posted 5 years ago #

    awesome solution, thank you very much!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.