Pagination on custom query
-
Hi again.
I’m sorry for this rather beginner question, but I’ve tried many things and I couldn’t get it working.
I’m using a custom query to display posts on the homepage (index.php):
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; $query=new WP_Query(array( 'post_type' =>'release', 'paged' => $paged, 'posts_per_page' => 10, 'post__not_in' => $swiftFeatured, ));
Everything works as expected, except when I define a page in the url like this:
/page/3/
, I’m getting “page not found” error, but again, the expected posts are being displayed without a problem whatsoever.I’ve tried changing the permalink structure and reverting it back.
Any help would be appreciated.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Pagination on custom query’ is closed to new replies.