Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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')); 
} ?>
share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

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.