• Resolved anandg

    (@anandg)


    I’m using is_home() to determine if a user is on the homepage. If so, than class="active" is written in the navigation. The homepage uses a static front page.

    All the navigation options are working, except for the is_home() function. For the other navigation parts i’m using is_category() and is_page().

    I found someone with the same problem.
    http://wordpress.org/support/topic/104543?replies=3

    It is stated that is_home() doesn’t work when you’re using a static front page. Should I use a post for the front page so that is_home() works?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter anandg

    (@anandg)

    If I use the “Posts Page” option in Options > Reading > Front page display then the is_home() works. But now my static home page is gone and is now using the index.php instead of the customized page I created.

    Is there a way/hack/plugin I can use to use the static front page and still get is_home() to return true when I’m on the homepage (wich is showing the static front page)?

    Thread Starter anandg

    (@anandg)

    Yess, I found the solution!
    http://www.bos89.nl/1197

    It’s a plugin that uses the is_frontpage() syntax and returns true if you’re at the homepage even if it’s a static front page.

    Recent versions have the function is_front_page()

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘is_home() is not working’ is closed to new replies.