Site logo

Archived topic

Click phone number in mobile navigation without opening the menu

5 replies · Started by Thordis on December 12, 2017

Viewing posts 1–6 of 6

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.

Hi Leo,

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

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.

This archived topic is closed to new replies.