Register Menus and Add Custom Menus

// Create Custom menus
function register_custom_menus() {
  register_nav_menus(
    array(
    	// 'primary-menu' => __( 'Primary Menu' ),
      'customone-menu' => __( 'Custom One Menu' ),
      'customtwo-menu' => __( 'Custom Two Menu' ),
     )
   );
 }
 add_action( 'init', 'register_custom_menus' );
function atk_add_submenu() {
if (is_page_template( 'your-template-name.php' )){
    wp_nav_menu( array( 
       'theme_location' => 'custom-menu', 
	'container_class' => 'sub-menu-container',
	'menu_id'         => 'custom-menu',
	'menu_class'      => 'sub-menu nav',
	// 'link_before' => '<span class="screen-reader-text">',
	// 'link_after' => '</span>', 
	) )
;}
add_action( 'storefront_before_content', 'atk_add_submenu', 5 );
No Comments

Sorry, the comment form is closed at this time.