Skip to content

Instantly share code, notes, and snippets.

@Greg-Boggs
Last active July 24, 2019 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Greg-Boggs/08660989f52f717ef5c572e41a5e08d3 to your computer and use it in GitHub Desktop.
Save Greg-Boggs/08660989f52f717ef5c572e41a5e08d3 to your computer and use it in GitHub Desktop.
Nav component
<nav class="navbar navbar-default">
<!-- toggle -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<?php /* Primary navigation */
wp_nav_menu( array(
'menu' => 'top_menu',
'depth' => 2,
'container' => false,
'menu_class' => 'nav navbar-nav',
//Process nav menu using our custom nav walker
'walker' => new wp_bootstrap_navwalker())
);
?>
</div>
</nav>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment