[wp-hackers] Difference between is_home and is_front_page

Austin Matzko if.website at gmail.com
Thu Jan 22 19:39:20 GMT 2009


On Thu, Jan 22, 2009 at 1:27 PM, Dan Gayle <dangayle at gmail.com> wrote:
> Can anyone explain the difference between is_home() and is_front_page()?
>
> They appear to me, from the Codex documentation, that they do the same
> thing.

is_home() returns true for the page where your latest posts show up.
Most of the time that's the top-level page such as
http://example.com/.  The top level page is also where is_front_page()
returns true, so most of the time they do return true at the same
page.

But if you have a static front page, your front page could be at
http://example.com/ (is_front_page() returns true) but your latest
posts somewhere else, e.g. http://example.com/latest-posts/ (is_home()
returns true here and not at http://example.com/).

In the future, you should know that a great place for support
questions like this is the WordPress support forums:
http://wordpress.org/support/  (The wp-hackers has historically been
about development issues).


More information about the wp-hackers mailing list