[Support request] Click phone number in mobile navigation without opening the menu

Home Forums Support [Support request] Click phone number in mobile navigation without opening the menu

Home Forums Support Click phone number in mobile navigation without opening the menu

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #447543
    Thordis

    Right now, I am inserting a phone-number and a logo to the mobile menu like this:

    add_action( 'generate_inside_mobile_menu','logo' );
    function logo() { ?>
        <span class="tel"><a href="tel:0234">02234</a></span><span class="logo-mobil"><a href="/home"><img src="/img/logo-mobil.png" /></a></span>
    <?php }

    This works, but when I click the phone number or the logo the menu opens as well, because these two elements are part of the button.

    How can I change this? How can I put these two elements outside the button?

    I already tried to use the Mobile Header, but that doesn´t work for me, because I have background-images in the header which don´t show then.

    Thanks.

    #447824
    Leo
    Staff
    Customer Support

    Hi there,

    Would you consider using our page header add-on for the front page and merge it with navigation instead of adding the image as header background?

    That’s the best to achieve the layout you are doing for:
    https://docs.generatepress.com/article/page-header-overview/
    https://docs.generatepress.com/article/merging-the-page-header-site-header/

    Then you can use the default mobile header.

    Let me know.

    #447897
    Thordis

    Hi Leo,

    I think this won´t work, because I have a different image for each page 🙁

    #448025
    Leo
    Staff
    Customer Support

    That is actually what the new page header is good for.

    Simply turn on Add Background image in the page header without adding any image, then it should automatically grab the featured image you upload for each post/page.

    Let me know if this answers works for you.

    #448061
    Thordis

    ah, ok -thanks!

    That is definitly a great feature, but there is still a problem. The background-image hast to be behind the navigation as well, like seen here: https://screenshots.firefox.com/WWLlZ2Nw7sHIDatg/kunden.perun.net

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