Support » Themes and Templates » I can't for the life of me figure out how to get the nextpage tag to work

  • I’m working with a child class of the 2011 theme and I can’t get the <–nextpage–> tag to work. I’ve tried adding <?php wp_link_pages(); ?> into page.php where it ought to go (between <?php get_template_part( 'content', 'page' ); ?> and <?php comments_template( '', true ); ?>), but to no avail.

    Does anyone have any advice?

    PS: I’m not looking for a plugin fix. Unless I’m completely off, this should be a one- or two-line fix that shouldn’t require that heavy lifting.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael


    Forum Moderator

    the code already exists in content-page.php of Twenty Eleven;

    <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>

    you will need to add the corresponding <!--nextpage--> tag into the content of a page to get it working.

    or install a plugin to get a ‘nextpage’ button for the visual editor:



    you have to be careful if you cut n paste <!–nextpage–> it has to be exactly :
    less-than symbol(<), exclamation point(!), two short dashes (– the one under the underline key on a U.S. keyboard),nextpage (text / no spaces), two more short dashes(–),greater-than symbol(>).

    I would suggest that you either type it out manually or if you cut n paste it from a web page you paste it in a plain text editor first to check if there are still two dashes. I think some themes (or maybe even WordPress itself? autop?) turns two dashes into a long dash?

    I just spent two hours going in circles figuring this out – doh…

    In your question you left out the exclamation point!

    The <!–nextpage–> tag was working fine until I updated to WordPress 3.5. Now when when I click on the numbered page link all it does is reload the main page.

    Really a novice with php and don’t have a clue as to why this is happening.

    The site is and until I can work out what the problem is I’m not using the <!–nextpage–> tag

    However, it’s a 2,500 word page and my bounce rate has gone way up now that its not being segmented.

    Please advise


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I can't for the life of me figure out how to get the nextpage tag to work’ is closed to new replies.