[wp-trac] [WordPress Trac] #14195: $paged is not set when a Static Page is set as the Front Page

WordPress Trac noreply at wordpress.org
Mon Aug 19 10:56:04 UTC 2013


#14195: $paged is not set when a Static Page is set as the Front Page
-----------------------------------------+-----------------------------
 Reporter:  der                          |       Owner:  wonderboymusic
     Type:  defect (bug)                 |      Status:  accepted
 Priority:  normal                       |   Milestone:  3.7
Component:  Query                        |     Version:  3.0
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch close 2nd-opinion  |
-----------------------------------------+-----------------------------
Changes (by duck_):

 * keywords:  has-patch => has-patch close 2nd-opinion


Comment:

 Replying to [comment:2 nacin]:
 > A single post with paginated content uses the 'page' variable, while
 paginated multiple posts uses 'paged'. So $page I imagine stores exactly
 what you want.

 Exactly. When using a static front page it is expected that the `page`
 query variable is set and `paged` isn't. The confusion is due to the fact
 that `/page/XX` style pretty permalinks are used for page_on_front, see
 #12391 for why this happened. Also #13840 and comment 10 in particular.

 > If that sounds right, then the only thing that we may need to
 investigate is why paged is still being set deep in the query and not
 exposed in the query var, which doesn't sound right.

 The reason it is set in the `$query` property is due to the use of
 `/page/XX` which passes `paged=XX` to `WP_Query`. The code introduced in
 [13494] for #12391, and removed in the patch here, switches this to the
 page query variable, but doesn't modify the `$query` property. I don't
 think we should modify this because it is still the input.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/14195#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list