I’m building a theme with a page template that queries posts with the following code:
$temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query('post&paged='.$paged); ?>
This works great, and pagination is no problem. However, on another page template, I’m using the exact same method, yet I’m changing the search criteria to query based on post_type. That code is:
$temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query('post_type=television&paged='.$paged);
That code works to pull and display the proper ‘television’ posts, but my pagination breaks when trying to view page 2 — I get a “Page not found error”.
What’s the deal here? Am I querying custom posts improperly?
- The topic ‘Need Help With Cranky Pagination on Page Templates’ is closed to new replies.