SHARE
TWEET

Untitled

a guest Aug 14th, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. wp_nav_menu([
  2.                 'menu'              => 'Primary Menu',
  3.                 'theme_location'    => 'primary',
  4.                 'depth'             => 3,
  5.                 'container'         => 'div',
  6.                 'container_class'   => 'a',
  7.                 'container_id'      => 'b',
  8.                 'menu_class'        => 'nav navbar-nav',
  9.                 'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
  10.                 'walker'            => new wp_bootstrap_navwalker()
  11.         ]);
  12.      
  13. function get_menu_params(){
  14.  
  15.     $defaults = array(
  16.         'menu'              => 'Primary Menu',
  17.         'theme_location'    => 'primary',
  18.         'depth'             => 3,
  19.         'container'         => 'div',
  20.         'container_class'   => 'a',
  21.         'container_id'      => 'b',
  22.         'menu_class'        => 'nav navbar-nav',
  23.         'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
  24.         'walker'            => new wp_bootstrap_navwalker()
  25.     );                          
  26.     return $defaults;
  27. }
  28.      
  29. wp_nav_menu( get_menu_params( ) );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top