Recently I'm working in a wp project. I create a custom post type name myproducts & I use wp-pagenavi plugin for create custom post navigation. But Its not work properly. Here is my code:
<?php /*** Template Name: Products ***/ ?>
<?php get_header(); ?>
<ul>
<?php query_posts( 'posts_per_page=10&post_type=playstore' ); ?>
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<div>
<li>
Products here
</li>
</div>
<?php endwhile; ?>
</ul>
<div class="page_nav">
<?php wp_pagenavi(); ?>
</div>
<?php else : ?>
<p>Nothing Found!</p>
<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
I also tried in search google, stackoverflow. I also tried those tutorial:
- http://css-tricks.com/snippets/wordpress/paginate-custom-post-types/
- https://teamtreehouse.com/forum/custom-post-type-pagination
- http://code.tutsplus.com/articles/custom-post-type-pagination-chaining-method--wp-21444
- http://designphiliconline.blogspot.com/2012/08/wordpress-custom-post-type-pagination.html
But my bad luck, no one are worked :( Please help me.
Thanks