I have a custom post type, jobs, being displayed on an external page using WP_Query() - the query itself is working fine.
However when I try to paginate the results, the older/newer links show up, but when I click on them, the content doesn't change - ie the page 'number' changes in the URL & the page reloads, but the posts don't move on.
I've tried using Wordpress' default next_posts_link & previous_posts_link and also with the wp_pagenavi plugin. In the code below I'm using wp_pagenavi .
Here's my code:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $params = array( 'post_type' => 'job', 'post_status' => 'publish', 'posts_per_page' => 3, 'paged'=>$paged ); $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query($params); ?> <?php if (function_exists('wp_pagenavi')){ wp_pagenavi(); } ?> <?php if ( $wp_query->have_posts() ) : while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?> // doing things with the post <?php endwhile; endif ?> <?php $wp_query = null; $wp_query = $temp; wp_reset_query() ?> Any help would be greatly appreciated it - this is driving me up the wall! ^_^