WordPress.org

Support

Support » Plugins and Hacks » Hacks » [Resolved] nextpage tag (pagination) and duplicate comments!

[Resolved] nextpage tag (pagination) and duplicate comments!

  • 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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael
    Forum Moderator

    @alchymyth

    $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 ); ?>

    That works great, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] nextpage tag (pagination) and duplicate comments!’ is closed to new replies.