Last active
August 29, 2015 14:01
-
-
Save jonbellah/1c2b25c9e511a1f3c19e to your computer and use it in GitHub Desktop.
bootstrap nav walker header
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header id="masthead" class="site-header navbar" role="banner" itemscope="itemscope" itemtype="http://schema.org/WPHeader"> | |
<div class="container"> | |
<div class="row"> | |
<div class="navbar-header"> | |
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home" class="navbar-brand"><?php bloginfo( 'name' ); ?></a> | |
</div> | |
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> | |
<?php /* Primary navigation */ | |
wp_nav_menu( array( | |
'theme_location' => 'primary', | |
'depth' => 2, | |
'container' => false, | |
'menu_class' => 'nav navbar-nav', | |
//Process nav menu using our custom nav walker | |
'walker' => new wp_bootstrap_navwalker()) | |
); | |
?> | |
</div> | |
</div><!-- .row --> | |
</div><!-- .container --> | |
</header><!-- .site-header --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment