Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
05693133dd
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
50 lines (50 sloc) 1.88 KB
<div id="nav-dropdown">
<div id="dropdown-wrapper">
<nav id="dropdown" class="container">
<nav id="site-navigation" class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#primary-nav">
<span class="sr-only">Toggle navigation</span>
<span class="menu-icon">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</span>
<span class="menu-label">Menu</span>
</button>
<a class="navbar-brand visible-xs" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
</div>
<a class="skip-link screen-reader-text sr-only" href="#content">
<?php _e( 'Skip to content', 'cs' ); ?></a>
<div class="collapse navbar-collapse" id="primary-nav">
<?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'.$nav1.' '.$nav2,
'theme_location' => 'primary', /* where in the theme it's assigned */
'container' => false, /* container class */
'fallback_cb' => 'hale_main_nav_fallback',
'items_wrap' => '<ul id="%1$s" class="%2$s"><li><a href="'.home_url().'">Home</a></li>%3$s</ul>',
'walker' => new Bootstrap_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>
<!-- #site-navigation -->