I have created a category on my wordpress installation which is called new arrivals. Now in this category I want to show ALL posts from all my other categories – kind of like what you would find on your homepage. So I created a new category template file called category-new-arrivals.php and then put this code in it:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts(array( 'paged' => $paged, 'category__not_in' => array(-1), 'posts_per_page' => 50, )); ?>
When I load the category the first page works fine, as it shows 50 items (default is 40) and posts from every category (minus the one excluded).
However when I move to /new-arrivals/page/2/ I get a 404 not found page even though I check for the page number at the start and use it in the query_posts
Can anyone explain why this is happening and how to fix it?
- The topic ‘query_post Pagination Problem’ is closed to new replies.