Dropdowns in bootstrap menu doesn't work
-
Hi
I had made a bootstrap menu in WP, and it display as it should.
I had followed this guid: Se it hereMy only problem is, that the dropdowns in the menu doesn’t work…
Here is my enqueues:
function wpt_register_js() {
wp_register_script('jquery.bootstrap.min', get_template_directory_uri() . '/js/bootstrap.min.js', 'jquery');
wp_enqueue_script('jquery.bootstrap.min');
}
add_action( 'init', 'wpt_register_js' );function wpt_register_css() {
wp_register_style( 'bootstrap.min', get_template_directory_uri() . '/css/bootstrap.min.css' );
wp_enqueue_style( 'bootstrap.min' );
}
add_action( 'wp_enqueue_scripts', 'wpt_register_css' );And here is my menu:
<header class="header">
<nav class="navbar navbar-expand-md navbar-light bg-light" role="navigation">Navbar
'primary',
'depth' => 2,
'container' => 'div',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'bs-example-navbar-collapse-1',
'menu_class' => 'nav navbar-nav',
'fallback_cb' => 'WP_Bootstrap_Navwalker::fallback',
'walker' => new WP_Bootstrap_Navwalker(),
) );
?></nav>
</header>
I hope someone can help, thank!
Best regards
Oscar -
Hi Oscar –
Help for sites that run the open source WordPress software will come from the community forums at https://wordpress.org/support/
- The topic ‘Dropdowns in bootstrap menu doesn't work’ is closed to new replies.