[Support request] Failing at inserting an element at inside_mobile_menu hook

Home Forums Support [Support request] Failing at inserting an element at inside_mobile_menu hook

Home Forums Support Failing at inserting an element at inside_mobile_menu hook

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #2372616
    Elvis

    Hello,

    I have tried searching the forum, but couldnt find what I need.

    Inside the mobile menu panel, at the end I would like to have search and social icons. Like this:

    Social icons and search on the bottom of mobile menu

    And I am trying to do that using this

    settings in generatepress element

    But nothing happens.

    If I choose any other mobile menu related hook, it appears, only these are not where I want it. Only not in place I want. πŸ˜€

    Please help.

    To understand recursion, you first have to understand recursion.

    #2372677
    Ying
    Staff
    Customer Support

    Hi there,

    Are you using the off-canvas menu for the mobile?

    If so, try using theinside_slideout_navigation hook.

    #2372732
    Elvis

    Hi Ying,
    no, not the slideout version.

    thanks.

    To understand recursion, you first have to understand recursion.

    #2372875
    Fernando
    Customer Support

    Hi Elvis,

    For reference, can you share the link to the site in question?

    You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    #2373296
    Elvis

    Hi @Fernando,
    check out the site linked in the private box.
    Thanks

    To understand recursion, you first have to understand recursion.

    #2373410
    David
    Staff
    Customer Support

    Hi there,

    if you use the Hook: after_primary_menu it will output the HTML here:

    2022-10-14_15-10-51

    you will need to use some CSS to ensure its display: block on mobile and display: none for desktop and its flex order is high enough to move it down to its logical position.

    #2373662
    Elvis

    Thanks @David,

    that kinda works. Any Ideas why inside_mobile_menu does not work? The issue is, accessibility wise, this kind of layout that does not reflect the actual structure of the HTML document tends to produce problems when it comes to screen readers and keyboard navigation in my experience.

    What I am trying to say I would like to have the buttons in the proper place, just after the mobile menu UL. Its more elegant CSS wise, html wise.

    Thanks,
    Elvis

    To understand recursion, you first have to understand recursion.

    #2373669
    David
    Staff
    Customer Support

    The inside_mobile_menu hook is really badly named, as its position is actually inside the navigation element.

    There is no Hook inside the UL element – is that where you are wanting to add it ?

    #2373672
    Elvis

    Hi @David,
    inside #mobile-menu element, right after the UL element.

    When I place it there in my dev tools, everything is dandy. πŸ˜€

    To understand recursion, you first have to understand recursion.

    #2373686
    Elvis

    Also, It would be ok If it was placed in <nav> element, but its not there?!

    To understand recursion, you first have to understand recursion.

    #2373698
    David
    Staff
    Customer Support

    Unfortunately we can’t hook inside the #mobile-menu as thats the menu wrapper.
    The method i proposed here does place it in the nav > inside-navigation element though ….

    #2373703
    Elvis

    True. inside_mobile_header seems to do that too. πŸ™‚

    Pitty it cannot be in #mobile-menu. Will work withint the inside-navigation though.

    I just have trouble sticking it to the bottom, without position.

    Thanks, I’ll figure it out from here.

    Best,
    E

    To understand recursion, you first have to understand recursion.

    #2373706
    David
    Staff
    Customer Support

    If you can hook it in there, and i can see it, i can take a look at fixing it below the UL. Let me know

    #2373714
    Elvis

    Thanks, its done.
    Will push to staging later.

    .social-icons { order: 5; min-height: calc(100vh -90px); }
    .inside-navigation { align-content: flex-start;}

    Done,
    Thanks a lot

    To understand recursion, you first have to understand recursion.

    #2373740
    David
    Staff
    Customer Support
Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.