[Plugin: WP-PageNavi] all custom post type pagination
-
I have the code above, which mean to create pagination use WP_PAGENAVI for all custom post types
$values = Array
(
[0] => custom-post-type-1
[1] => custom-post-type-2
[2] => custom-post-type-3
[3] => custom-post-type-4
)$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args=array( 'post_type' => $values, 'paged' => $paged, 'post_status' => 'publish', "$tax" => $tax_term->slug, 'posts_per_page' => 2, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); //some custom code for display post type endwhile; } wp_reset_query(); wp_pagenavi( array( 'query' => $my_query ) );
all display is correct, but when I want to go to second page, the post of custom post types didn’t change to the older post. Is there something missing from my codes?
need for solutions for this ??
best regards
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘[Plugin: WP-PageNavi] all custom post type pagination’ is closed to new replies.