[wp-trac] [WordPress Trac] #13840: $Paged Won't Set On Index When Static Page Is Set
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 11 03:06:54 UTC 2010
#13840: $Paged Won't Set On Index When Static Page Is Set
--------------------------+-------------------------------------------------
Reporter: tehfab1 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Query | Version: 3.0
Severity: normal | Keywords: paged, pagination, $paged, get_query_var('paged')
--------------------------+-------------------------------------------------
Hey Wordpress Masters :),
I've spent the better part of four hours trying to figure what the heck
was going on with a new template I've been developing for Wordpress 3.0.
After some rather extensive testing I figured out that when you have a
custom loop on a wordpress page (e.g. query_posts()) and that page is set
as the static front page of the blog, the pagination seems to break
completely.
As an example I have two images here. I went to a more standard wordpress
theme since my theme is still incomplete. Basically what I did was set a
page as the static front page of the site and then added the following
code to the page.php file in the template:
http://www.alleysandcorners.com/sfs/wordpress-paged.png
On any other page of the site, if I visited that page it would output a
number. Like:
blog.com/pagename/page/2 would die with "int(2)".
But on the index, a URL like
blog.com/page/2 produced a var_dump of "string(0) "''"" like so:
http://www.alleysandcorners.com/sfs/paged_in_wordpres_3.0.png
This odd behavior ONLY happens on the index of the site, and ONLY when a
static page is set. Any other page on the site seems to paginate perfectly
fine, regardless of if there is a wordpress loop on the page or not.
I even tried turning off permalinks and reverting backed to
index.php?paged=2 . Still no luck if I have a static page set.
Any help would be greatly appreciated. Not sure if there is a proper way
to fix this, but I'm fairly certain at this point that this is a wordpress
3.0 issue.
I'm running 3.0-RC2-15182 on Dreamhost Shared Hosting.
PHP5 (don't know the version number).
Apache, etc.
Thanks in advanced for any insight you can provide :).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13840>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list