Issues with pagination on front page?
-
Hello!
I’m currently using the following query as suggested by the Codex on my front page:
<?php if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } elseif ( get_query_var('page') ) { $paged = get_query_var('page'); } else { $paged = 1; } ?> <?php $wp_query = new WP_Query(array( 'post_type' => array('post', 'portfolio'), 'posts_per_page' => 5, 'paged' => $paged )); ?>
However, this query will allow me to navigate from pages 1-3 just fine, but return 404 on page 4, even though
$max_num_pages
returns7
.What am I doing wrong?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Issues with pagination on front page?’ is closed to new replies.