The option_generate_menu_plus_settings
filter allows you to filter the options in our Menu Plus add-on.
These options are all available in the customizer. The filters allow you to change the setting under certain conditions.
Available Options
Return Value
mobile_menu_label
Set the text of your mobile menu label.
'My custom mobile menu label'
sticky_menu
Activate or disable sticky navigation.
'mobile' //mobile only 'desktop' //desktop only 'true' //both 'false' //disable
sticky_menu_logo
The URL to your navigation logo.
'URL to image'
sticky_menu_effect
Set the sticky navigation transition.
'fade' 'slide' 'none'
auto_hide_sticky
Hide the sticky navigation unless you’re scrolling up towards the top of the site.
'true' 'false'
sticky_menu_logo_position
Set the navigation logo position.
'sticky-menu' //Sticky only 'menu' //Sticky + static 'regular-menu' //Static only
mobile_header
Activate or disable the mobile header.
'disable' 'enable'
mobile_header_sticky
Activate or disable the sticky mobile header.
'disable' 'enable'
mobile_header_auto_hide_sticky
Hide the sticky mobile header unless you’re scrolling up towards the top of the site.
'true' 'false'
slideout_menu
Activate or disable slideout navigation.
'mobile' //Mobile only 'desktop' //Desktop only 'both' //On 'false'//Off
slideout_menu_side
Set the side which the slideout navigation opens from.
'left' 'right'
Example
If we want to use different settings for static home page:
add_filter( 'option_generate_menu_plus_settings','lh_custom_homepage_menu_plus_settings' ); function lh_custom_homepage_menu_plus_settings( $options ) { if ( is_front_page() ) { $options['mobile_menu_label'] = 'Home Page Toggle Text'; $options['sticky_menu'] = 'off'; $options['mobile_header'] = 'enable'; $options[‘mobile_header_sticky’] = 'enable'; $options[‘mobile_header_auto_hide_sticky’] = 'false'; } return $options; }