WordPress at a glance

register_nav_menu() WP 1.0

Registers a navigation menu location for a theme.

Works based on: register_nav_menus()

No Hooks.

Return

Null. Nothing.

Usage

register_nav_menu( $location, $description );
$location(string) (required)
Menu location identifier, like a slug.
$description(string) (required)
Menu location descriptive text.

Changelog

Since 3.0.0 Introduced.

Code of register nav menu: wp-includes/nav-menu.php WP 5.2.2

<?php
function register_nav_menu( $location, $description ) {
	register_nav_menus( array( $location => $description ) );
}

Related Functions

From tag: nav menu (nav_menu)

More from category: Other Theme Functions

No comments
    Hello, !     Log In . Register