1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

WP Comments - reverse_top_level problem

Discussion in 'WordPress' started by vexx, Mar 5, 2014.

  1. #1
    Hey guys,

    I recently encountered a problem. I have reverse_top_level=true in the wp_list_comments function and everything was ok, all the new comments appeared on top..etc. However, once the post had more than 15 comments, which started to paginate them, every new comments went to the 2nd page.

    I'm not sure what to do now.
     
    vexx, Mar 5, 2014 IP
  2. competent123

    competent123 Notable Member

    Messages:
    1,743
    Likes Received:
    69
    Best Answers:
    6
    Trophy Points:
    255
    #2
    dont' you think you can just select the relevant options in settings>discussions?

    Break comments into pages with N top level comments per page and the First/Last page displayed by default. Comments should be displayed with the older/newer comments on the top of each page.

    if it doesnt' work, due to xyz reasons, try this plugin

    http://wordpress.org/plugins/fix-reversed-comments-pagination/
     
    competent123, Mar 5, 2014 IP
  3. vexx

    vexx Well-Known Member

    Messages:
    204
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    123
    #3
    the plugin you provided hasn't been updated for 2 years, so no, I probably won't use that. Also, i've did those settings and they simply don't work for the comments. Paginate is the problem, on page 1, the comments are sorted just fine, page 2 the same, but it's not an unity..it's like every page is on a different article.
     
    vexx, Mar 5, 2014 IP
  4. HassanKhalid

    HassanKhalid Active Member

    Messages:
    158
    Likes Received:
    6
    Best Answers:
    4
    Trophy Points:
    90
    #4
    Look at using a conditional tag in the comments file along with the new parameter.

    Info on conditions:
    http://codex.wordpress.org/Conditional_Tags

    Let's assume you have something like this..
    <ol class="commentlist">
                <?php wp_list_comments(); ?>
            </ol>
    Code (markup):
    Update that with, something along the lines of..
    <ol class="commentlist">
                <?php if(is_page()) : wp_list_comments('reverse_top_level=1'); else : wp_list_comments();  endif; ?>
            </ol>
    Code (markup):
     
    HassanKhalid, Mar 5, 2014 IP
  5. vexx

    vexx Well-Known Member

    Messages:
    204
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    123
    #5
    Actually, it's not about pages and posts..it's about the paging of the comments. The comment area breakes down in 20 comments per page, so if the post/page has more than 20 comments, they go to the next page. However, while the order is newer first, if there is more than 1 page, after the first 20 comments, the newer comments will go to page 2 and so forth. Basically, the comments are not unified and sorted.
     
    vexx, Mar 5, 2014 IP