WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I set my 'About' page as home page, its permalink (my_site/about/) became my_site/ as a result. Is_page('about') returns TRUE on my local server but FALSE on online server.

Why is that ?

share|improve this question
up vote 3 down vote accepted

You can use the function is_front_page().

Put this where you want to check if is frontpage

if( is_front_page() ) {
    echo 'I am the frontpage';

It returns TRUE when the main blog page is being displayed and the Settings->Reading->Front page displays is set to "Your latest posts", or when is set to "A static page"

share|improve this answer
Works, thanks Pontus! Just out of curiosity, what could cause the difference of behaviour between local and online servers? – drake035 Jan 29 '13 at 16:14
Maybe you did forget to set the correct template? – Pontus Abrahamsson Jan 29 '13 at 16:21
Hmm nope, I am quite sure it was the right template. – drake035 Jan 29 '13 at 16:26
Okey, its hard to say from here. But good its working now :)! – Pontus Abrahamsson Jan 29 '13 at 16:30
Lol yep thanks again! – drake035 Jan 29 '13 at 20:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.