What is the difference between is_home() and is_front_page()?
is_front_page() checks the front page of the site: it can be the latest posts page or a static page, as set in Settings > Reading.
is_home() checks the blog posts page, where the latest posts are listed.
| Reading setting | is_front_page() | is_home() |
|---|---|---|
| Your latest posts | true on the home page | true on the home page |
| A static page for the front, and another for the posts | true on the static front page | true on the posts page only |
So when you show the latest posts on the front, both are true. After you set a static front page, they are different. See Conditional Tags.
Learn more about the similar topics:
| Tutorials |
|---|
| WordPress Themes |
| WordPress Top Theme List |
| WordPress Theme Files and Functions |
| WordPress Template Hierarchy |
| WordPress Enqueue Scripts and Styles |
| WordPress Loop |
| WordPress WP_Query Class |