[wp-trac] [WordPress Trac] #14328: next page doesn't work when using a template page for front page

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 25 17:14:17 UTC 2010


#14328: next page doesn't work when using a template page for front page
--------------------------+-------------------------------------------------
 Reporter:  juggledad     |        Owner:          
     Type:  defect (bug)  |       Status:  reopened
 Priority:  normal        |    Milestone:          
Component:  Template      |      Version:  3.0     
 Severity:  normal        |   Resolution:          
 Keywords:  2nd-opinion   |  
--------------------------+-------------------------------------------------
Changes (by mfields):

 * cc: michael@… (added)
  * keywords:  template front page pagination => 2nd-opinion
  * component:  General => Template


Comment:

 I have encountered this problem as well. I'm not sure why, but
 get_query_var( 'paged' ) always seems to return an empty value where
 is_front_page() returns true. I believe that this is a bug as well.

 @juggledad - You can use the following code in your page template to allow
 the proper value to be applied to the $paged global.
 {{{
 global $paged;
 $paged = get_query_var( 'paged' );
 if( is_front_page() ) {
         $paged = get_query_var( 'page' );
 }
 }}}

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


More information about the wp-trac mailing list