Either it just happen, either I didn't saw it before, but when I go into Portfolio, the limit is 12 then there is a page navigation at the bottom (up to 3 pages long). When I click on page #2 or #3, i get Error 404.
How to fix this ?
My WP
Settings - Reading - Blog pages show at most = 12 posts
My initial page's code
<div class="content-wrapper">
<?php if ( get_query_var('paged') ) {
$paged = get_query_var('paged');
} else if ( get_query_var('page') ) {
$paged = get_query_var('page');
} else {
$paged = 1;
}
// THIS LINE below will call the theme's portfolio max number, which I have set to 12 also
query_posts( array( 'post_type' => 'portfolio', 'posts_per_page' => get_option('pxp_portfolioquantity'), 'paged' => $paged ) ); ?>
<section class="main-wrapper <?php echo get_option('pxp_gridmode'); ?> portfolio">
<?php get_template_part( 'loop' ); ?>
</section><!-- END mainWrapper -->
<ul class="page-navigation" id="numbering">
<?php get_pagination(); ?>
</ul>
<?php wp_reset_postdata(); // Reset ?>
<?php if (get_option('pxp_enable_sideblogstream') == "true" ) { ?>
<?php get_template_part( 'inc_sideblogfeed' ); ?>
<?php } ?>
</div><!-- END contentWrapper -->
My newer page's code (trying to fix it myself)
//same codes but THIS LINE change only to
query_posts( array( 'post_type' => 'portfolio', 'posts_per_page' =>12, 'paged' => $paged ) ); ?>
Aucun commentaire:
Enregistrer un commentaire