[wp-trac] Re: [WordPress Trac] #6848: is_front_page() and is_home() erroneously returns true on /blog/page/2 and so forth

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 26 10:27:20 GMT 2008


#6848: is_front_page() and is_home() erroneously returns true on /blog/page/2 and
so forth
-----------------------------------------------+----------------------------
 Reporter:  Pinoy.ca                           |        Owner:  anonymous
     Type:  defect                             |       Status:  new      
 Priority:  normal                             |    Milestone:  2.5.2    
Component:  Template                           |      Version:  2.5      
 Severity:  normal                             |   Resolution:           
 Keywords:  is_front_page is_home 2nd-opinion  |  
-----------------------------------------------+----------------------------
Comment (by Pinoy.ca):

 {{{is_front_page()}}} was
 [http://trac.wordpress.org/ticket/3682#comment:18 markjaquith]'s solution
 in February last year.  In that discussion, unfortunately, the
 participants didn't talk about {{{/blog/page/2}}} and so forth.

 I would believe that everyone who said "front of the site" there was
 referring to {{{blog_info("home")}}}.  Thus, ''there can be only one front
 page.''

 By the way, the fix for this is replacing

 {{{if ( 'posts' == get_option('show_on_front') && is_home() )}}}

 on query.php with

 {{{if ( 'posts' == get_option('show_on_front') && is_home() && !is_paged()
 )}}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6848#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list