Testing if current page is the static page set as home page

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 ?

Related posts

Leave a Reply

1 comment

  1. 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”