A WordPress-centric search engine for devs and theme authors



register_nav_menus ›

Since3.0.0
Deprecatedn/a
register_nav_menus ( $locations = array() )
Parameters:
  • (array) $locations Associative array of menu location identifiers (like a slug) and descriptive text.
    Required: No
    Default: array()
Defined at:
Codex:

Registers navigation menu locations for a theme.



Source

function register_nav_menus( $locations = array() ) {
	global $_wp_registered_nav_menus;

	add_theme_support( 'menus' );

	$_wp_registered_nav_menus = array_merge( (array) $_wp_registered_nav_menus, $locations );
}