Next/Previous post goes to a 404
-
I have never had these links work smoothly for me. But in this instance, they go to a ‘404 error not found’ page on page 2. I am using /%category%/%postname%/ url structure. The url it tries to go to is https://blogaddress.com/blog/page/2/ which is where the error is.
This is the code I’m using:<?php get_header(); ?> <div id="content" class="narrowcolumn"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=3&showposts=1&paged=$paged"); ?> <?php if (have_posts()) : ?> <div id="lefttop"></div> <div id="blogpoint"> <div id="leftcol"> <?php while (have_posts()) : the_post(); ?> <div id="leftsquidge"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2><br /><br /> <?php the_excerpt(); ?> </div> <div id="rightsquidge"> <?php the_tags( '<p><strong>File under:</strong> ', ', ', '</p>'); ?> <?php the_time('F jS, Y') ?> by <strong><?php the_author() ?></strong> </div> <div style="clear:both;"></div> <br /><br /> <?php endwhile; ?> <div class="navigation" style="padding:0px;margin:0px;"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php endif; ?> <div style="clear:both;"></div> </div> </div> <div id="leftbot"></div> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
I had a search around and i cannot find anyone else who has had this problem. Does anyone know what I am doing wrong?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Next/Previous post goes to a 404’ is closed to new replies.