[wp-hackers] Pagination wp_query variable bug?
Matt Slocum
mattslocum at sharefaith.com
Tue Aug 21 16:02:50 UTC 2012
Hi all,
I have a plugin that puts blog posts onto a page. (This means I use a
custom new WP_Query) It has been working great until recently a user put
attempted to set the page with blog posts as his static front page. Now all
of a sudden pagination doesn't work. It knows how many pages there should
be, but the ?paged=# url or /page/#/ url doesn't change from page 1. I dove
back into my code and here is what I've been using:
$paged = is_numeric(get_query_var('paged')) ? get_query_var('paged') : 1
I did a print_r of the $wp_query variable and it is showing that the
pagination variable is called 'page' on the static front page. On all
normal pages, the pagination variable is still 'paged'. I've adjusted my
code to check both 'page' and 'paged' to get the current page. I can't find
any documentation about why a static front page would use the 'page'
variable and everything else would use the 'paged' variable. Do you think
this a bug?
Thanks,
Matt
More information about the wp-hackers
mailing list