Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/is nav menu

This page redirects to an external site: https://developer.wordpress.org/reference/functions/is_nav_menu/

Description

This Conditional Tag checks if the given id, slug, or name is a navigation menu. This is a boolean function, meaning it returns either TRUE or FALSE.

Usage

<code style="color: #000000"><span style="color: #0000BB"><?php is_nav_menu</span><span style="color: #007700">( </span><span style="color: #0000BB">$id </span><span style="color: #007700">); </span><span style="color: #0000BB">?></span></code>

Parameters

$id
(mixed) (required) Menu ID, Menu Name or Menu Slug
Default: None

Return Values

(boolean) 
True on success, false on failure.

Examples

Notes

Change Log

Since: 3.0.0

Source File

is_nav_menu() is located in wp-includes/nav-menu.php.

Related

This page is marked as incomplete. You can help Codex by expanding it.
See also index of Function Reference and index of Template Tags.