Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




has_nav_menu [ WordPress Function ]

has_nav_menu ( $location )
Parameters:
  • (string) $location Menu location identifier.
Returns:
  • (bool) Whether location has a menu.
Defined at:



Whether a registered nav menu location has a menu assigned to it.

Source


<?php
function has_nav_menu$location ) {
    
$locations get_nav_menu_locations();
    return ( ! empty( 
$locations$location ] ) );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics