how make custom menu in wordpress
snippet in php

how make custom menu in wordpress

user9039

function wpb_custom_new_menu() {
  register_nav_menus(
    array(
      'my-custom-menu' => __( 'My Custom Menu' ),
      'extra-menu' => __( 'Extra Menu' )
    )
  );
}
add_action( 'init', 'wpb_custom_new_menu' );

wp main menu

user721

wp_nav_menu( array( 'theme_location' => 'header', 'menu' => 'Main Menu') );

how make custom menu in wordpress

user8431

<?php
wp_nav_menu( array( 
    'theme_location' => 'my-custom-menu', 
    'container_class' => 'custom-menu-class' ) ); 
?>