• Hi There

    I know that there is a setting in the WordPress to show the newer comments first.

    The problem I have is that I only want to do this on one page. Is there somewhere in the functions.php file where I can go something like

    <IF PAGENAME >
    Show comments with newest first
    <ELSE>
    carry on as usual.
    <end if>

    Before the twentyten I could have just used

    <?php foreach (array_reverse($comments) as $comment) : ?> with “ispage()”

    But I can’t find the equivelent using this theme. – Any suggestions would be great – I’m not really a programmer so please be gentle!

    MUCH APPRECIATED!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    Try this:

    in comments.php change this:

    wp_list_comments( array( 'callback' => 'twentyten_comment' ) );

    to this:

    if(is_page('42')) { // change page ID
    wp_list_comments( array( 'callback' => 'twentyten_comment', 'reverse_top_level' => true ) );
    } else {
    wp_list_comments( array( 'callback' => 'twentyten_comment' ) );
    }

    Thread Starter mattyk

    (@mattyk)

    That worked! Keesiemeijer – you are a genius. Thanks!

    Moderator keesiemeijer

    (@keesiemeijer)

    You’re welcome. Glad you got it solved

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Reverse Comments Order Conditionally – TwentyTen Theme’ is closed to new replies.