0

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')); 
} ?>
3

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 Apr 21 '13 at 7:38
  • 2
    I guess you should be using the is_front_page() conditional tag then. – Zlatev Apr 21 '13 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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