Add Custom Menu to Theme

function atk_add_submenu() {
        if (is_page_template( 'template-name.php' )){
		wp_nav_menu( array( 
		'theme_location' =>  'custom-menu', 
		'container_class' => 'custom-menu-container',
		'menu_id'         => 'custom-menu',
		'menu_class'      => 'sub-menu', 
		) 
	);}
	if (is_woocommerce()){
		wp_nav_menu( array( 
		 'theme_location' => 'shop-menu', 
		'container_class' => 'sub-menu-container',
		'menu_id'         => 'shop-menu',
		'menu_class'      => 'sub-menu',
		) 
	);}
}
add_action( 'storefront_before_content', 'atk_add_submenu', 5 );

No Comments

Sorry, the comment form is closed at this time.