Category Pagination
-
I’m using the following code:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?> <?php query_posts('posts_per_page=2&cat=4'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="tutorial"> <div class="image"></div> <div class="text"> <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> <?php the_content(); ?> </div> <div class="cboth"></div> </div> <?php endwhile; endif; ?> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>And whilst it generates the pagination, when one clicks on the pagination links, the index.php template is loaded – and therefore page 2 of the results isn’t shown at all.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
The topic ‘Category Pagination’ is closed to new replies.