404s beyond page 2
-
I’m pulling my hair out trying to get pagination to work on my site. My pagination shows up, and works when I edit the variables for ‘posts_per_page’ in my query. However, it will only show the first and second page, and the third (https://dev.lukeshumard.com/chromeleaf/page/3/) is always a 404 error. My permalink structure is set up to /%year%/%monthnum%/%day%/%postname%/. I have WP-Paginate installed, here is my code for index.php.
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args= array( 'cat' => 1, 'posts_per_page' => 1, 'paged' => $paged ); ?> <?php query_posts($args); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?></small> <div class="entry"> <?php the_content(); ?> </div> </div> <div class="divide"></div> <?php endwhile; ?> <?php if(function_exists('wp_paginate')) { wp_paginate(); } ?> <?php else: endif; ?>
The only other plugins I have installed are GigPress, Contact Form 7, and WP No Category Base (which I’ve tried deactivating in case that did anything).
I am completely stumped, and can’t help but wonder if I’m overlooking something incredibly simple. I’ve searched through a few threads slightly similar to this, but I couldn’t find a straight answer. Anyone?
- The topic ‘404s beyond page 2’ is closed to new replies.