[wp-trac] Re: [WordPress Trac] #3682: is_home() returns FALSE when using a static page as your front page

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 24 21:15:51 GMT 2007


#3682: is_home() returns FALSE when using a static page as your front page
--------------------------------------+-------------------------------------
 Reporter:  johnbillion               |        Owner:  anonymous
     Type:  defect                    |       Status:  reopened 
 Priority:  high                      |    Milestone:  2.3      
Component:  Template                  |      Version:  2.1      
 Severity:  normal                    |   Resolution:           
 Keywords:  dev-feedback 2nd-opinion  |  
--------------------------------------+-------------------------------------
Comment (by Otto42):

 Replying to [comment:27 Nazgul]:
 > I'd suggest:
 >  * Make is_home return true on a static frontpage (what people expect)

 The problem is that that behavior breaks plugins and themes and anything
 else that expects is_home() to return true for the main posts page, which,
 up until recently, was the case. If you used a static homepage (home.php)
 in versions of WordPress before the easy menu options to do so were added,
 then it didn't work this way. This break backward compatibility.

 >  * Make is_home return true for the blog homepage as well (current
 behaviour)
 >  * Introduce an is_blog_as_home and is_page_as_home function which can
 be used to distinguish between the two.

 I vote for just these two options. Although I like is_front and is_blog
 better.

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


More information about the wp-trac mailing list