• I read most recent posts about pagination category pages but I just can’t get it to work. I tried few plugins with the same results. After the third page I get 404.

    Here is my code:

    <?php
    
    query_posts( array(
    	'posts_per_page' => 3,
    	'cat' => "5",
    	'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ),
    ));
    
    if ( have_posts() ) : while ( have_posts() ) : the_post();
    
    	echo get_the_content(); 
    
    ?>
    
    <?php endwhile; else: ?>
    
    <?php endif; ?>
    
    	<?php if (  $wp_query->max_num_pages > 1 ) : ?>
    	<?php previous_posts_link( __( '<span></span> Previous Stories ', 'themename' ) ); ?>
    	<?php next_posts_link( __( 'More Stories <span></span>', 'themename' ) ); ?>
    
    <?php endif; ?>
    
    <?php wp_reset_query(); ?>
  • The topic ‘Category Pagination’ is closed to new replies.