allow comments for multi-page posts on last page only (3 posts)

  1. wp.Man
    Posted 3 years ago #

    when a page is created and split to create multiple pages, i want to display the comment form only on the last page

    can do?

  2. Michael
    Forum Moderator
    Posted 3 years ago #

    in page.php, wrap the 'comments_template(()' code into a conditional statement; example:

    <?php if( $numpages == 1 || ($numpages > 1 && $page == $numpages) ) comments_template( '', true ); ?>

  3. wp.Man
    Posted 3 years ago #

    hi alchymyth
    i tried that snippet and it didn't work for me

    i use CloudFlare and WP Super Cache, so i dumped all caches, including browser cache, and still didn't work. no errors

    don't worry about it though - no big deal

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.