Pagination not working for custom post type
-
I keep getting page not found errors when trying to access the second page of posts.
My code:
<?php global $query_string; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts($query_string . "&post_type=Products&posts_per_page=3&paged=$paged"); ?>
And to get the links:
<div class="navigation"> <div class="alignleft"><?php next_posts_link('Next 3') ?></div> <div class="alignright"><?php previous_posts_link('Previous 3') ?></div> </div>
The Next 3 button shows up, but when clicked it returns a 404.
My permalink setting is:
/%category%/%postnameI’ve tried changing the page settings in the admin console, and the “Category pagination fix” plugin with no success.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Pagination not working for custom post type’ is closed to new replies.