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.

Missing hook for mobile menu?

  • Hi,

    on my site I use the offcanvas slideout menu for desktop/tablet and the mobile menu for mobile devices.

    I want to add social icons below the menu items in each of those menus and I have created a Block for that that I hooked into after_slideout_navigation and it works perfectly.

    However, I cannot get it to work for the mobile menu.

    Choosing menu_bar_items just drops the Block behind the site logo.

    inside_mobile_menu or after_mobile_menu_button have no effect.

    Am I missing something?

    Thank you!

  • Hi there,

    Try inside_mobile_header hook, then add a CSS class to the root container of the element content, eg. mobile-social-icons.
    Adding CSS class(es): https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/

    Then add this CSS:

    #mobile-header.toggled .mobile-social-icons {
        order: 10;
        display: block;
    }
    
    #mobile-header:not(.toggled) .mobile-social-icons {
        display: none;
    }
  • That did the trick, thanks a lot!

  • You are welcome   🙂

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