WordPress.org

Ready to get started?Download WordPress

Forums

Reversing the order of comments in WP3 (4 posts)

  1. prettysimple
    Member
    Posted 3 years ago #

    One of my pages is acting as a Guestbook which people can comment on. I want to reverse the comment order so that the most recent appear at the top. Ideally I only want this to affect that page - no other posts.

    I have found various solutions for earlier WP versions, but none which work for 3.0.1. Any ideas?

  2. Michael
    Member
    Posted 3 years ago #

    Under Settings >> Discussion is a drop-down box for older or newer comments, will that work?

    Michael

  3. Mark / t31os
    Moderator
    Posted 3 years ago #

    Under Settings >> Discussion is a drop-down box for older or newer comments, will that work?

    Unfortunately not in this case.... as per the user's request..

    Ideally I only want this to affect that page - no other posts.


    @prettysimple

    You will probably need to open up your theme's comments.php file and place some conditional code around the call to wp_list_comments.. then additionally update the conditional wp_list_comments call to define a different sort order..

    See the reverse_top_level and reverse_children arguments..
    http://codex.wordpress.org/Function_Reference/wp_list_comments

    For checking when it's your given page..
    http://codex.wordpress.org/Function_Reference/is_page

    Hope that helps..

  4. prettysimple
    Member
    Posted 3 years ago #

    @roseapplemedia
    Thanks but Mark is right, I'm hoping to only apply this to the one page.

    @Mark
    Thanks, will look into that.

Topic Closed

This topic has been closed to new replies.

About this Topic