pagenavi not working on custokm post type
-
$paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
$args=array(‘post_type’ =>’gallery’,’catelog’ =>$catelog,’paged’ => $paged,’post_per_page’ => 1);
$wp_query = new WP_Query($args);
if ( $wp_query->have_posts() ) {
while ($wp_query->have_posts()) {
$wp_query->the_post();
the_title( ‘<h1>’, ‘</h1>’ );
the_content();
}
wp_pagenavi( array( ‘query’ => $wp_query ) );
wp_reset_postdata();
}This is my code but pagenavi not working,i have done this on archive-gallery but no pagination is seen in my output page that is localhost/wordpress/gallery
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘pagenavi not working on custokm post type’ is closed to new replies.