wp pagenavi with CPT , not showing page 2
-
i try this code the page show up but if i clicked it still on page one please help me thanks
<?php // Must have wp_pagenavi plugin installed. Custom Post Type names can not clash with page names or 404's will occur on /page/#/ (Utilize Custom Rewrite Slug in CPT) // The press release loop $the_press = new WP_Query(array('post_type' => 'wat','posts_per_page' => 10,'paged'=> get_query_var('paged') )); // The Loop while ($the_press->have_posts()) : $the_press->the_post(); ?> <h2>Nama : <?php the_title(); ?></h2> <p><?php the_excerpt(); ?></p> <p><a href="<?php echo the_permalink(); ?>" >Read More</a></p> <?php endwhile; ?> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(array('query'=> $the_press));} ?> <?php wp_reset_postdata();?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp pagenavi with CPT , not showing page 2’ is closed to new replies.