Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Custom menus

Custom menus by device, by user role

if ( ! function_exists( 'custom_navigation_menus' ) ) {

// Register Navigation Menus
function custom_navigation_menus() {

	$locations = array(
		'desktop_menu' => __( 'Desktop Menu', 'text_domain' ),
		'tablet_menu' => __( 'Tablet Menu', 'text_domain' ),
		'mobile_menu' => __( 'Menu Menu', 'text_domain' ),
		'editor_menu' => __( 'Editor Menu', 'text_domain' ),
		'admin_menu' => __( 'Admin Menu', 'text_domain' ),
	);
	register_nav_menus( $locations );

}

// Hook into the 'init' action
add_action( 'init', 'custom_navigation_menus' );

}