I am using a Page with a custom template that uses the following code to create a loop of 5 posts per page, which are paginated:
<?php query_posts(array('category__and'=>array(18),'showposts'=>5)); ?> <?php while(have_posts()) : the_post(); ?>
The problem is, page 2, page 3, etc., continue to show posts 1-5, and not 6-10, 11-15, etc. The loop just keeps repeating posts 1-5. The category contain 190 posts.
Here’s the page:
I even tried adding ‘posts_per_page=’=>5 to the options, but the results are the same.
Does anyone know what the problem could be?
- The topic ‘Page Pagination Not Working with Pages’ is closed to new replies.