[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 Feb 23 10:29: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.2      
Component:  Template                  |      Version:  2.1      
 Severity:  normal                    |   Resolution:           
 Keywords:  dev-feedback 2nd-opinion  |  
--------------------------------------+-------------------------------------
Changes (by markjaquith):

  * summary:  is_home() returns FALSE when using a static page as your
              front page, should return TRUE => is_home()
              returns FALSE when using a static page as your
              front page

Old description:

> When a static page is being used as the front page of your blog, the
> is_home() function returns true instead of the desired false.
>
> To recreate:
>
> 1. Go to Options -> Reading in your admin panel.
>
> 2. Choose a static page to use as your front page.
>
> 4. Insert a simple is_home() test in your template.
>
> 4. Observe the result of the is_home() function is false instead of true.

New description:

 When a static page is being used as the front page of your blog, the
 is_home() function returns false.  There is no simple function for
 determining "front of site, regardless of blog or page"

 To recreate:

 1. Go to Options -> Reading in your admin panel.

 2. Choose a static page to use as your front page.

 4. Insert a simple is_home() test in your template.

 4. Observe the result of the is_home() function is false

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


More information about the wp-trac mailing list