wp-pagenavi stuck on page 1 when permalinks are postname
-
So this might not even be a pagenavi issue, but I figured I’d start here.
So in the template of the page that I have set as my front page, I have this query:
<?php $args = array('posts_per_page' => 4, 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),); query_posts($args); while (have_posts()) : the_post(); ?> <h1 class="post-title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1> <?php endwhile; ?> <?php wp_pagenavi(); ?>
It displays correctly and pagenavi shows that there are 3 pages, but when you click page 2 or page 3 it just stays on page 1.
It does this even with the
<?php next_posts_link(); ?>
and only on the front page. Everywhere else pagination works exactly as it should.I’ve had pagenavi do this before and all I had to do was go into settings => Permalinks and reset the permalink structure back to default. Save the structure. Then change the structure back to postname, and it would work. So I tried this this time, and when I changed the structure back to default everything works. Then when I change the permalink structure back to postname it breaks again.
Like I said, this might not be a Pagenavi issue, but any incite or help would be greatly appreciated.
Thanks in advance,
Mike
- The topic ‘wp-pagenavi stuck on page 1 when permalinks are postname’ is closed to new replies.