I have the line of code below with the intention to display the called menu in every other page except the home page but it still shows up on the home page. Any ideas what the problem could be.

    <?php if (!is_home()) {
    wp_nav_menu (array('menu'=>'sideBar','menu_class' => 'navbar')); 
} ?>

1 Answer 1


Is your home page blog index or static page?

is_home() is meant to check if we are on blog index (latest posts), while is_front_page() checks if home is static page set in Settings > Reading.

  • The home page is Static.
    – Dz.slick
    Commented Apr 21, 2013 at 7:38
  • 2
    I guess you should be using the is_front_page() conditional tag then.
    – Z. Zlatev
    Commented Apr 21, 2013 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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