Pagination problem
-
I’m using the wp_pagenavi plugin and for some reason every time I click to go on another page it takes me back to my homepage.
I have a custom homepage and I am displaying all posts on a page called “Blog”
Any help would be appreciated.
<?php get_header(); ?> <div class="container group"> <?php get_sidebar();?> <?php if (have_posts()) : ?> <?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query('posts_per_page=8&paged=' . $paged); while ($wp_query->have_posts()) : $wp_query->the_post();?> <?php include('loop.php'); ?> <?php wp_pagenavi(); ?> <?php endwhile; $wp_query = null; $wp_query = $temp; ?> <?php else : ?> <?php endif; ?> </div><!--/.container--> <?php get_footer(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Pagination problem’ is closed to new replies.