This is expected behavior. The
functions.php file is parsed before the query is setup and available, so if you have
if ( is_front_page() ) sitting naked inside of
functions.php, it will return false, because there's no query yet.
What you need to do is to put your
is_front_page() conditional inside of a callback function, that is then hooked into an appropriate action - i.e. an action that fires after the query is setup/available.
For reference, I think
functions.php is parsed at
plugins_loaded (it might be
setup_theme), and the query conditionals should be available at or after
plugins_loaded and setup_theme do not work for me
Of course those hooks won't work for you. They fire before the query is setup. The
is_front_page() conditional is only available after the query is setup, which happens at
I need to remove_action() if the user is viewing the front page.
You're not really telling us exactly what you're trying to do. Your question simply asked when
is_front_page() available, which is what we answered. Knowing how/when to remove an action is a mostly entirely different question. You need to provide the
add_action() call you're wanting to remove.