I'm having some trouble with the WP Bootstrap navwalker script for Wordpress. When I'm on mobile, it shows a desktop dropdown when you click on a menu item, instead of the normal Bootstrap menu on mobile. See image here.
My menu code:
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="<?php bloginfo('url'); ?>"><img src="<?php bloginfo('template_directory'); ?>/assets/img/logo.png" alt="Aluproff"></a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<?php do_action('wpml_add_language_selector'); ?>
</ul>
<ul class="nav navbar-nav navbar-right">
<?php /* Primary navigation */
wp_nav_menu( array(
'menu' => 'primary',
'theme_location' => 'primary',
'depth' => 2,
'container' => false,
'menu_class' => 'nav',
//Process nav menu using our custom nav walker
'walker' => new wp_bootstrap_navwalker())
);
?>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
How can I fix this?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire