Hooks: Header Menu

← Back to all hooks
Hook Return Usage
wpex_ms_global_menu bool

Check’s if the theme should be displaying the main menu assigned to the primary site in a Multi-site installation. Default is false.

wpex_has_header_menu bool

Checks if the header menu should display or not.

wpex_main_menu_location string

Returns the registered menu location to be used for the header. Default is “main_menu”.

wpex_has_sticky_header_menu bool

Check if the header has a sticky menu. By default returns true for header styles two, three and four.

wpex_header_menu_wrap_classes array

Returns array of classnames to be used for the #site-navigation-wrap element.

wpex_header_menu_classes array

Returns array of classnames to be used for the #site-navigation element.

wpex_header_menu_ul_classes array

Returns array of classnames to be used for the .main-navigation-ul element.

wpex_custom_menu varied

Returns the ID of a custom menu to be used for the header menu. Accepts a menu ID, slug, name, or object.

wpex_has_menu_search bool

Checks if the menu search functionality can be enabled for the header. Note: if the search style is set to disabled this filter will not override.

wpex_menu_search_style string

Returns the menu search style. Accepts disabled, drop_down, overlay or header_replace.

wpex_get_header_menu_search_form string

Returns the search form to be used for the header. Default is get_search_form() or get_product_search_form().

wpex_get_header_menu_search_form_placeholder string

Returns the placeholder text to be used for the header menu search form.

wpex_menu_search_icon_theme_locations array

Returns an array of menus that support the header search icon functionality. Default is “main_menu”.

wpex_add_search_toggle_ubermenu_classes bool

Check if the theme should add the UberMenu specific classes to the header menu search toggle link when UberMenu is enabled.

wpex_header_search_text string

Returns the text added to the header menu search link toggle. This text is hidden by default as it’s primarily used for screen readers.

wpex_header_menu_search_position string

Returns the correct position for the header menu search icon link. Accepts start or end. Default is “end”.

wpex_header_menu_dropdown_style string

Returns the dropdown style to be used for the header menu dropdowns which get’s added to the #site-header element in the format “wpex-dropdown-style-{style_name}”.

wpex_get_header_drop_widget_class array

Returns an array of classnames to be added to header menu dropdown “widgets” such as the dropdown search and WooCommerce cart dropdown elements.