#17550 closed defect (bug) (invalid)
if (is_home() || is_front_page()) not working correctly
| Reported by: | webvitaly | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.1.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
I have "About" page - which is chosen as front page;
and "News" page - which is chosen as posts page;
I have such code:
if (is_home() || is_front_page()){
echo '=output=';
}
The string '=output=' prints on "About" and "News" page. But "News" page is not homepage and not front page. I think this is the bug.
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Please read the documentation. This is not a bug.
http://codex.wordpress.org/Function_Reference/is_home
http://codex.wordpress.org/Function_Reference/is_front_page