[Plugin: WP-PageNavi] Wp page navi on custom post type page
-
Hello i’m currently using custom post type on a page template, this is the code :
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $loop = new WP_Query( array( 'post_type' => 'myposttype', 'posts_per_page' => 4, 'paged'=>$paged ) ); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> .....loop code... <?php endwhile; ?> <?php wp_pagenavi(); ?>
If i use the normal pagination everything works but if i use
<?php wp_pagenavi(); ?>
nothing shows on my page… how to fix this ? thanks
EDIT : i’ve checked in wp page navi settings the option
“Show navigation even if there’s only one page.”
and now it shows some sort of navigation on my page but it says that there is only 1 page but it’s not true, there are 2 page… what’s going on ?
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘[Plugin: WP-PageNavi] Wp page navi on custom post type page’ is closed to new replies.