I realise this is in the FAQs page but I just cannot get this to show the page navigation. I would ideally like the nav to show above and below the posts. I have the following…
<?php /* Start the Loop */ $my_query = new WP_Query( array( 'cat' => '1', 'posts_per_page' => '5', 'paged' => get_query_var('paged'), 'orderby' => 'rand')); while ( $my_query->have_posts() ) : $my_query->the_post(); ?> <h2><?php the_title(); ?></h2> <?php the_excerpt(); ?> <?php endwhile; /* End the Loop */ ?> <?php wp_pagenavi(); ?> <?php wp_reset_query(); ?>
Sorry if this is really obvious but I can’t get pagenavi to work here.
- The topic ‘wp-pagenavi in custom query’ is closed to new replies.