is_front_page() should only return true on the front page
|Reported by:||Pinoy.ca||Owned by:|
As per 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.
Change History (17)
- Component changed from General to Template
- Summary changed from is_front_page() and is_home() erroneously returns true on /blog/?p=2 and so forth to is_front_page() and is_home() erroneously returns true on /blog/page/2 and so forth
- Keywords has-patch dev-feedback added; is_front_page is_home 2nd-opinion removed
- Milestone changed from 2.9 to 2.7.1
- Summary changed from is_front_page() and is_home() erroneously returns true on /blog/page/2 and so forth to is_front_page() should only return true on the front page
- Version changed from 2.5 to 2.7