Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /* In HEADER file PLUS 'wp_bootstrap_navwalker.php' has been uploaded to root of custom theme */
- wp_nav_menu( array(
- 'menu' => 'primary',
- 'theme_location' => 'primary',
- 'depth' => 2,
- 'container' => 'div',
- 'container_class' => 'collapse navbar-collapse',
- 'container_id' => 'bs-example-navbar-collapse-1',
- 'menu_class' => 'nav navbar-nav',
- 'fallback_cb' => 'wp_bootstrap_navwalker::fallback',
- 'walker' => new wp_bootstrap_navwalker())
- /* in FUNCTIONS file */
- function register_my_menus() {
- register_nav_menus(
- array(
- 'primary' => _('Primary Menu', 'jrmasonry')
- );
- }
- add_action( 'init', 'register_my_menus' );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement