added if has_nav_menu to menu bellow banner

This commit is contained in:
Fabiano Alencar 2018-04-17 14:40:43 -03:00
parent 790042bff7
commit 27d05b234a
1 changed files with 26 additions and 24 deletions

View File

@ -8,29 +8,31 @@ get_header('banner'); ?>
$bread .= "<li class='breadcrumb-item active' aria-current='page'>Blog</li>";
$bread .= "</ol>";
?>
<nav class="navbar navbar-expand-md navbar-light bg-white px-1" role="navigation">
<div class="container-fluid">
<?php if(wp_is_mobile()) echo $bread; ?>
<a class="navbar-brand" href="#"></a>
<!-- Brand and toggle get grouped for better mobile display -->
<button class="navbar-toggler text-heavy-metal border-0 px-2 pt-2" type="button" data-toggle="collapse" data-target="#menubelowHeader" aria-controls="menubelowHeader" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<?php
wp_nav_menu( array(
'theme_location' => 'navMenubelowHeader',
'depth' => 2, // 1 = with dropdowns, 0 = no dropdowns.
'container' => 'div',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'menubelowHeader',
'menu_class' => 'navbar-nav mr-auto ml-md-1',
'fallback_cb' => 'WP_Bootstrap_Navwalker::fallback',
'walker' => new WP_Bootstrap_Navwalker()
) );
?>
</div>
</nav>
<nav aria-label="breadcrumb" class="d-none d-md-flex">
<?php if(has_nav_menu('navMenubelowHeader')) : ?>
<nav class="navbar navbar-expand-md navbar-light bg-white px-1" role="navigation">
<div class="container-fluid">
<?php /* if(wp_is_mobile()) echo $bread; */ ?>
<a class="navbar-brand" href="#"></a>
<!-- Brand and toggle get grouped for better mobile display -->
<button class="navbar-toggler text-heavy-metal border-0 px-2 pt-2" type="button" data-toggle="collapse" data-target="#menubelowHeader" aria-controls="menubelowHeader" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<?php
wp_nav_menu( array(
'theme_location' => 'navMenubelowHeader',
'depth' => 2, // 1 = with dropdowns, 0 = no dropdowns.
'container' => 'div',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'menubelowHeader',
'menu_class' => 'navbar-nav mr-auto ml-md-1',
'fallback_cb' => 'WP_Bootstrap_Navwalker::fallback',
'walker' => new WP_Bootstrap_Navwalker()
) );
?>
</div>
</nav>
<?php endif; ?>
<!-- <nav aria-label="breadcrumb" class="d-none d-md-flex">
<?php //echo $bread; ?>
</nav>
</nav> -->
<div class="container-fluid mt-5" style="overflow-x: hidden;">