Pagination works but "current" page is always 1
-
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 https://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.
- The topic ‘Pagination works but "current" page is always 1’ is closed to new replies.