Support » Fixing WordPress » NextPage tag only works with Default Permalinks

  • Resolved chris630



    I’m trying to use the <!–nextpage–> tag on a page, not a post. The links show up fine at at the bottom of the next, but when I click on the page 2 link it throws a not found. My desired permalink structure is which makes the page 2 link

    The only way I’ve been able to get this to work is by switching permalinks back to default at that point the links work and load the pages correctly.

    I’ve been stumped on this and looking through code for a while. I have another site that’s a lot bigger that doesn’t have this problem at all but I can’t see any difference. Any help would be great thanks in advanced.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator keesiemeijer



    Do you have multiple loops on the page template or are you querying the main loop with query_posts?

    Can you post the full code of the page template here or in a pastebin – See the Forum Rules for posting code and using the pastebin.

    Here’s my loop-page.php code. It’s formatted the same way as my other site where the <!–nextpage–> tag works fine which is what’s so confusing. . .

    <div id="container">
    <div class="content">
    <?php if (have_posts()) : ?>
    	<?php while (have_posts()) : the_post(); ?>
    <div class="content-title">
    		<h1><?php the_title(); ?></h1>
    		<small><?php the_category(', '); ?> on <?php the_time('F j, Y'); ?> at <?php the_time(); ?>  by <?php the_author_posts_link() ?></small>
    </div><!--End Date-->
    		<?php the_content(); ?>
    		<?php wp_link_pages(); ?>
    <?php endwhile; ?>
    <?php else : ?>
    <?php endif; ?>
    <?php get_sidebar(); ?>
    Moderator keesiemeijer



    Does it work on other Pages with the same Page template?
    Do you have any custom posts type or custom taxonomies with the same title as your Page title?

    Of course…that was the problem! The site has a plugin that was interfering with it I didn’t even think about that. Thank you so much it’s always the little things that drive you nuts.


Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘NextPage tag only works with Default Permalinks’ is closed to new replies.