Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
42ed949a36
Go to file
 
 
Cannot retrieve contributors at this time
112 lines (96 sloc) 2.94 KB
<!-- CSS code from Bootply.com editor -->
<style type="text/css">
.marginBottom-0 {
margin-bottom: 0;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px 6px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #cccccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #555;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left>.dropdown-menu {
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}
</style>
<div id="nav-drop-multi">
<div id="drop-multi-wrapper">
<nav id="drop-multi" class="container">
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1"> <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 visible-xs" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-1">
<?php
$locations = get_nav_menu_locations();
$menu_at_primary_location = $locations['primary'];
$items = wp_get_nav_menu_items( $menu_at_primary_location );
if(empty($items)){
echo '<ul class="nav navbar-nav"><li><a href="'.home_url().'">Home</a></li></ul>';
} else {
$menu = wp_nav_menu(
array(
'menu_class' => 'nav navbar-nav',
'theme_location' => 'primary', /* where in the theme it's assigned */
'container' => false, /* container class */
'fallback_cb' => 'hale_main_nav_fallback',
'items_wrap' => '<ul class="%2$s"><li><a href="'.home_url().'">Home</a></li>%3$s</ul>',
'walker' => new Drop_Multi_Nav_Walker()/*,
'with_search' => true*/
)
);
}
?>
<div class="visible-xs-block">
<div class="navbar-form navbar-right">
<?php get_search_form(); ?>
</div>
</div>
</div>
</nav>
</nav>
</div>
</div>
<!-- JavaScript jQuery code from Bootply.com editor -->
<script type='text/javascript'>
(function($){
$(document).ready(function(){
$('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) {
event.preventDefault();
event.stopPropagation();
$(this).parent().siblings().removeClass('open');
$(this).parent().toggleClass('open');
});
});
})(jQuery);
</script>
You can’t perform that action at this time.