Here is the navigation in question http://firehouseservices.com/a3k/
I am trying to implement the Bootstrap 3 nav into my WordPress. My issues are:
- when the navigation collapses and shows "menu" button to expand the menu, the button doesn't seem to do anything. It doesn't open the collapsed menu.
- check the first link "automated marketing" it has a drop down item, the drop down works fine and the link on the submenu item works fine, but the main link for automated marketing just shows the link of "#" so it doesn't produce the correct link.
- where I can I set the menu to collapse at a smaller pixel range than it is collapsing now?
Here is my code in my header.php to pull in the menu:
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-top-collapse">
<span class="sr-only">Toggle navigation</span>Menu
</button>
</div>
<div id="navbarCollapse" class="collapse navbar-collapse">
<?php
wp_nav_menu( array(
'menu' => 'top_menu',
'depth' => 2,
'container' => false,
'menu_class' => 'nav navbar-nav',
'fallback_cb' => 'wp_page_menu',
'walker' => new wp_bootstrap_navwalker())
);
?>
</div>
</div>
</nav>
Here is my code for functions.php:
// Register Custom Navigation Walker
require_once('wp_bootstrap_navwalker.php');
// Add the 'top_menu' location in a theme setup function.
function bootpress_setup() {
register_nav_menus(
array(
'top_menu' => 'Top Menu'
)
);
}
// Add setup function to the 'after_setup_theme' hook
add_action( 'after_setup_theme', 'bootpress_setup' );
I am also using a script in header.php to make the dropdown work on hover
<script>
$(function() {
$('ul.nav li.dropdown').hover(function() {
$('.dropdown-menu', this).fadeIn('fast');
}, function() {
$('.dropdown-menu', this).fadeOut('fast');
});
});
</script>
And I'm pulling in jquery and bootstrap.js in my header as such:
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<script src="<?php $blog_title = get_bloginfo('template_directory'); ?
>/js/bootstrap.min.js"></script>
Any help fixing my issues 1-3 at the top of this request would be most appreciated.
