Burger menu not closing automatically when anchor links on same page

This topic has 9 replies, 3 voices, and was last updated 6 months, 3 weeks ago ago by Jack Richardson

  • Avatar: webshockstudio
    wssrob
    Participant
    May 24, 2024 at 11:30

    Hi,
    When opening the hamburger menu on mobile and clicking on one of the (anchor) links, the menu remains open after it has navigated to the correct section.
    If the link is to a different page, the menu does close automatically, if the link is an anchor to a section of the page, it does not close automatically.

    You can manually click the X to close it, but I’d like to make sure the hamburger menu closes automatically when the anchor links are clicked.

    Thanks!

    8 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 24, 2024 at 13:55

    Hello,

    Thank you for reaching out to us with your query.

    Could you please provide temporary wp-admin access?

    To grant WP-Admin access, please proceed to create a new user account with an administrator role through your WordPress Dashboard. Once the account is established, you may securely transmit the username and password to us via the Private Content section designated for this purpose.

    Best Regards,
    8Theme’s Team

    Avatar: webshockstudio
    wssrob
    Participant
    May 24, 2024 at 15:21

    Here is temp admin access. Please note I checked on your demo template (business, wpbakery), and if you change the url link in the mobile menu to an anchor (like #) the problem is present there, too.

    Thanks, kind regards!

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 24, 2024 at 15:30

    Hello,

    Please try to activate the “One Page Menu” in Theme Options > Header Builder > Mobile menu.

    Best Regards,
    8Theme’s Team

    Avatar: webshockstudio
    wssrob
    Participant
    May 24, 2024 at 15:52

    Did that (in both headers, as I have one for home page and one for standard pages), and nothing changed.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    May 24, 2024 at 16:01

    Hello,

    We appreciate your prompt response.

    As we can see, your current menu contains pages, not anchor links https://prnt.sc/d2Pk6TBtQJ3X

    Please watch this video about one-page menu – https://youtu.be/EeR0Jn9eUpA?feature=shared

    Best Regards,
    8Theme’s Team

    Avatar: webshockstudio
    wssrob
    Participant
    May 24, 2024 at 16:31

    Dear Rose,
    I’d like the links in the main menu to remain links and not anchors.
    The anchor is a button – html block in the mobile menu, and that’s where the problem is. When clicking the button in the html block link, the menu does not close automatically.

    Avatar: webshockstudio
    wssrob
    Participant
    May 25, 2024 at 08:07

    If anyone is willing to solve this, the only solution I found is enabling the one page option in “theme -> mobile menu”, but you cannot use anchors links in buttons or other custom block / html parts of the mobile menu anyway.
    I had to remove my custom HTML button, and add a new menu item, styled with CSS to look like a button.
    And that introduced another bug, because the hover fx was applied not correctly, and the FX was always applied to the first menu-item.
    Had to introduce another menu item, and them hide it, a dirty hack, but at the moment it’s all working.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    May 25, 2024 at 11:21

    Dear @wssrob,

    Thank you for reaching out to us regarding your inquiry about the functionality of working anchors within the Custom HTML block. We would like to inform you that such functionality is not enabled by default due to the nature of custom code used in these blocks. This situation typically requires a unique, additional customization.

    Our team of expert developers is ready to assist you with a tailored solution to meet your specific needs. To proceed, we kindly ask you to submit a request for customization services. Once we receive your request, we will provide you with a detailed estimate of the costs involved.

    If the solution you found is not acceptable for you and you need to have more advanced one you can submit your request via the following link: [8Theme’s Customization Services](https://www.8theme.com/account/#etheme_customization_panel).

    Best regards,
    Jack Richardson
    The 8Theme Team

  • Viewing 9 results - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.