• The pagination on my site correctly shows the first set of pages, then the group of larger numbers, just as I specified. And each of those page links works correctly. However, page 1 is always set as the current page and next is always linked to page 2.

    I’ve dug through lots of support responses and details. Following the instructions at http://scribu.net/wordpress/wp-pagenavi/right-way-to-use-query_posts.html I updated my query_posts to:
    query_posts(array('post_type'=>'page','post_parent'=>585,'orderby' => 'title', 'order' => 'ASC', 'paged' => get_query_var('paged') ) );

    wp_reset_query() is run right after that loop, as it should.

    But I still get page 1 as current and next as page 2, no matter what page I’m on.

    I have tested the value of get_query_var(‘paged’) at various points in the code by printing it to a comment. The value is always 1.

    I’ve also tried using the get_query_var(‘page’) variation and the result is the same.

    Any help would be most appreciated.

    http://wordpress.org/extend/plugins/wp-pagenavi/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I am running WP 3.5.1 and WP-PageNavi 2.83 and having the same problem as the post, above. Any advice would be very much appreciated.

    Thanks,

    David

    Couple of things that may or may not help:

    1. Where is your reset put in the template? Is it after the loop, or is it after wp_pagenavi()?
    2. Have you tried using wp_reset_postdata()? instead of wp_reset_query()?

    My template is using the postdata reset after the call for pagenavi and is highlighting the correct page when navigating.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pagination works but "current" page is always 1’ is closed to new replies.