Ok, I'm creating a wordpress theme. I don't want my navigation menu to show in the home page "Only" if the site admin setup Front page displays > A static page (select below).
otherwise I want to show the menu in home page & other pages too. I've used this <?php if(!is_front_page()):?>
function, but it is not working.
some one suggest me "<?php if(!is_home()):?>
", but it is not working either.
So how do I make it work?
Full code:
<?php if(!is_home()):?>
<!-- NAVIGATION START -->
<div id="navigation">
<nav class="navbar navbar-custom" role="navigation">
<div class="container">
<div class="row">
<div class="col-sm-2">
<div class="site-logo">
<a href="index.html" class="brand">ajax</a>
</div>
</div>
<div class="col-sm-10">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#menu">
<i class="fa fa-bars"></i>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="menu">
<?php wp_nav_menu( array(
'theme_location' => 'secondary',
'menu_class' => 'nav navbar-nav navbar-right',
'fallback_cb' => 'false'
)); ?>
</div>
<!-- /.Navbar-collapse -->
</div>
</div> <!--bootstrap row end-->
</div> <!--bootstrap container end-->
</nav>
</div>
<!--NAVIGATION END -->
<?php endif;?>