To overcome the header problem, i have resolved to do away with default twentyseven header and opt for bootstrap base header and nav menu. I have integrated wp_bootstrap_navwalker() menu to it and i am yet to get it fully. Though, it display menu but they not collapsing like on mobile device.
what do you think i have done wrong?
Here below is my bootstrap navigation code and below is what i have done on my wordpress. My nav
<nav class="navbar navbar-expand-md fixed-top-sm justify-content-start flex-nowrap ">
<div class="container">
<div class="navbar-brand">
logo
</div>
<ul class="navbar-nav flex-row ml-auto">
<li class="nav-item active">
<a class="nav-link px-2" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link px-2" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link px-2" href="#">Link</a>
</li>
</ul>
<button class="navbar-toggler ml-auto" type="button" data-toggle="collapse" data-target="#navbar2">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</nav>
<nav class="navbar navbar-expand-md bg-success navbar-light">
<div class="container">
<div class="navbar-collapse collapse pt-2 pt-md-0" id="navbar2">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Link 2</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link 2</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link 2</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- #masthead -->
<nav class="navbar navbar-expand-md fixed-top-sm justify-content-start flex-nowrap ">
<div class="container">
<div class="navbar-brand">
<?php if ( is_front_page() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php endif; ?>
<?php
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) :
?>
<p class="site-description"><?php echo $description; ?></p>
<?php endif; ?>
</div>
<button class="navbar-toggler ml-auto" type="button" data-toggle="collapse" data-target="#navbar2">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</nav>
<nav class="navbar navbar-expand-md bg-success navbar-light">
<?php
wp_nav_menu(array(
'theme_location' => 'primary',
'container' => 'div',
'container_id' => 'main-nav',
'container_class' => 'navbar-collapse collapse pt-2 pt-md-0',
'menu_id' => 'navbar2',
'menu_class' => 'navbar-nav',
'depth' => 3,
'fallback_cb' => 'wp_bootstrap_navwalker::fallback',
'walker' => new wp_bootstrap_navwalker()
));
?>
</nav>
<!-- #masthead -->