Languages: English • 日本語 Português do Brasil • (Add your language)
Registers a single custom Navigation Menu in the custom menu editor (in WordPress 3.0 and above). This allows administration users to create custom menus for use in a theme.
See register_nav_menus() for creating multiple menus at once.
<?php register_nav_menu( $location, $description ); ?>
None.
<?php add_action( 'after_setup_theme', 'register_my_menu' ); function register_my_menu() { register_nav_menu( 'primary', __( 'Primary Menu', 'theme-slug' ) ); } ?>
add_theme_support( 'menus' );
register_nav_menus( array( $location => $description ) );
register_nav_menu() is located in wp-includes/nav-menu.php
.