I’m trying to place pagination links onto my custom WordPress homepage loop but for some reason it just isn’t working. Nothing is showing up at all, not even an empty DIV.
I’m using the kriesi_pagination solution, the code for which can be found via the link.
Here is my loop code, if it’s of any help:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$query = new WP_Query( array( 'post_type' => array( 'post', 'reviews', 'features', 'podcasts' ), 'posts_per_page' => 2 , 'paged' => $paged ) );
if(have_posts()) : while($query->have_posts()) : $query->the_post(); ?>
The function is being called after the endwhile; statement at the bottom of the loop.
Any ideas why this isn’t working? It’s driving me insane!
You can try to change your
$query
variable name into$wp_query
like this:…It may help (as some pagination functions expects query object to be called this way), however you should check if other queries on your site were not affected by this change.