Site logo

Archived topic

Secondary Menu Search and offcanvas menu

5 replies · Started by Nathan on February 23, 2021

Viewing posts 1–6 of 6

Hi there,

As more moving the search icon/bar to the secondary navigation:

This snippet should work if you're using Flexbox on Appearance > Customize > General.

add_action( 'wp', function() {
    if ( 'enable' === generate_get_option( 'nav_search' ) ) {
        remove_action( 'generate_menu_bar_items', 'generate_do_navigation_search_button' );
        add_action( 'generate_secondary_menu_bar_items', 'generate_do_navigation_search_button' );
    }
}, 20 );

As for making the secondary navigation work as a offcanvas toggle, this will be quite tricky. You may have to resort to scripting to make it work.

Hi there,

create a blank Menu ( ie. has no menu items ) for the Secondary Nav.

Thanks @david thats one way to get around it. Not sure GP will work for project unless I can get off canvas menu in the secondary position as well.

This archived topic is closed to new replies.