-
I’m currently using a mobile header with a dropdown menu, and I’d like to continue using it.
However, I have a couple of areas of my site that would benefit from a popout off-canvas sidebar with widgets in addition to the mobile menu (an online store with faceting and filtering widgets only displayed on certain pages).
At the moment, I’m having to use a separate popup generator plugin, but I’d be keen to use built-in GeneratePress features if I could, to keep the site light.
Is there a way to use the off-canvas panel with its widget area, and trigger it from a custom button click, rather than have it take over the main primary navigation menu button?
Thanks in advance!
-
I think I’ve found the solution to this. I needed to set the display of the off-canvas panel to “Desktop Only”, so it didn’t take over the mobile menu.
And while
remove_action( 'generate_menu_bar_items', 'generate_do_off_canvas_toggle_button', 15 );
Didn’t work to remove the hamburger menu:
add_action('wp', function(){ remove_action( 'generate_menu_bar_items', 'generate_do_off_canvas_toggle_button', 15 ); });
Did, so I could then add a button elsewhere with the class “slideout-toggle”.
-
Glad to hear you got it working.
And Happy New Year!
- You must be logged in to reply to this topic.