Moabs
-
Posts
2 -
Joined
-
Last visited
Posts posted by Moabs
-
-
Hi guys, need some help changing the URL of the mobile version of a logo. It is a Wordpress website.The frontend code shows the following:
<div id="g1-id"> <h1 class="site-title"> <a href="https://domainnamehere.co.uk"><img style="width: 278px; height: 61px;" id="g1-logo" src="https://domainnamehere.co.uk/wp-content/uploads/2016/02/logo2.png" alt="Logo" data-g1-src-desktop="https://domainnamehere.co.uk/wp-content/uploads/2016/02/logo2.png" data-g1-src-desktop-hdpi="https://domainnamehere.co.uk/wp-content/uploads/2016/02/logo2.png" height="61" width="278"> <noscript> <img src="https://domainnamehere/wp-content/uploads/2016/02/logo2.png" alt="Logo" /> </noscript> <img id="g1-mobile-logo" src="https://domainnamehere.co.uk/wp-content/uploads/2016/04/mobile-logo.png" alt="Logo" data-g1-src-mobile="https://domainnamehere.co.uk/wp-content/uploads/2016/04/mobile-logo.png" data-g1-src-mobile-hdpi="https://domainnamehere.co.uk/wp-content/uploads/2016/04/mobile-logo.png" height="61" width="278"> </a> </h1> </div>
In the theme-functions.php I found this code:
$out_desktop = '<img'. $size_desktop .' id="g1-logo" src="'. esc_url($desktop_src) .'" alt="'. esc_attr($name) .'" '. $data_desktop_str .' /> <noscript><img src="'. esc_url($desktop_src) .'" alt="'. esc_attr($name) .'" /></noscript>'; $out_mobile = '<img'. $size_mobile .' id="g1-mobile-logo" src="'. esc_url($data['data-g1-src-mobile']) .'" alt="'. esc_attr($name) .'" '. $data_mobile_str .' />';
Which bit do I have to change, the change the out URL of the mobile logo?
I understand it could be the part that is esc_url($data['data-g1-src-mobile']) but I am unsure exactly where to add my telephone URL such as tel:442344567890
Thankyou
Changing URL of logo
in Applications
Posted
Hi,
Thanks for your reply. Yes it seems to be outputting both logos and then when the screen size is reduced, it changes to the logo to the mobile version.
I need to make the mobile logo a click to call URL link, as opposed to it going to the homepage. So a link like <a href="tel:1-847-555-5555">Call Us Now</a>
Here are the two header files I could find:
Header.php:
header-g1-simple.php:
finally, theme-functions.php: