is_home doesn't work with predefined page


Hi, I just install a fresh wordpress. I add getbeans. I create a page (static). And in setting I set this page as homepage (and not the last posts).

In this cas, in functions.php if I use the function "is_home", it doesn't work...

But it works if I set the homepage on last posts.

Is it a problem with getbeans ?

I try to find a solution, by example I test the fucntion "is_page(id)", without success.

It's on a fresh install, that's why I think getbeans need to add this possible, I'm sure I'm not the only person who use a static page for set the homepage of a website, and add a function is_home in functions.php

Thank you in advance for your help ! Regards, Emmanuel


Hi Emmanuel,

This WordPress related, is_home() (see documentation here) should be used to check if your are on the "main blog page" home while is_front_page() (see documentation here) should be used to check if you are on the front page.

Hope that helps πŸ™‚

Happy coding,


Hi Thierry,

Hey, thank you ! Thanks for share your time and help, I learn something πŸ™‚

Best regards, Emmanuel


Fantastic! We are always happy to help people who are willing to learn πŸ™‚

Write a reply

Login or register to write a reply, it's free!