Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Using Off Canvas Panel Separately From Mobile Menu

  • 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!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.