WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] nextpage tag (pagination) and duplicate comments! (3 posts)

  1. invasive
    Member
    Posted 3 years ago #

    Hi Guys,

    I just found something that might be a problem for duplicate content. It seems that if you break a post up into pages (<!--nextpage--> tag) the comments that people leave are duplicated across every page.

    Any idea how to get around this problem? (Like: only show comments on the "last" page of a post)

    Bill

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    $page and $numpages are the global variables for the pages of a paginated post/page:

    this will only show the comments and comment form on the last of the paginated parts:

    <?php if( $page == $numpages ) comments_template( '', true ); ?>
  3. invasive
    Member
    Posted 3 years ago #

    That works great, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic