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

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 26 04:08:16 GMT 2008


#6848: is_front_page() and is_home() erroneously returns true on /blog/?p=2 and so
forth
----------------------+-----------------------------------------------------
 Reporter:  Pinoy.ca  |       Owner:  anonymous             
     Type:  defect    |      Status:  new                   
 Priority:  normal    |   Milestone:  2.5.2                 
Component:  General   |     Version:  2.5                   
 Severity:  normal    |    Keywords:  is_front_page, is_home
----------------------+-----------------------------------------------------
 As per [http://codex.wordpress.org/Conditional_Tags#The_Front_Page
 documentation] these functions return true only at the site's first page.
 It can be shown that these functions return true for the second, third and
 subsequent pages as well (?p=2, 3, and so on)

 is_home() on the documentation is ambigious with "is this the blog view
 homepage" (i.e., uses the index.php template) and has been around since
 2.1.  In addition to its dependency with get_home_template(), there may
 already been plugins who anticipate this long-standing bug.

 is_front_page() has no dependencies, so I suggest that is_front_page() be
 corrected, moving forward.  ''There can be only one front page.''

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


More information about the wp-trac mailing list