Hi!
Is it possible in the header area to adjust the logo in mobile format? This is because on the desktop it has to be “large” but when it is like that on mobile it is superimposed with the search and menu icons
thank you
Hey noventa90,
Can you try adding this code in your child theme’s functions.php:
/*Use a different logo on mobile*/
add_filter('avf_logo','av_change_logo');
function av_change_logo($logo) {
if ( wp_is_mobile() ) {
$logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png";
}
return $logo;
}
Just change the logo URL.
Hope this helps.
Best regards,
Nikko
Hi Nikko!
Thanks for your help, but don’t work.
/*Use a different logo on mobile*/
add_filter(‘avf_logo’,’av_change_logo’);
function av_change_logo($logo) {
if ( wp_is_mobile() ) {
$logo = “https://mercainox.pt/wp-content/uploads/2017/10/logo-mercainox-90px.png”;
}
return $logo;
}
I paste this on the functions.php
Hi noventa90,
I have tested this code and it does work on my end (the logo will not change when resizing the browser).
Can you try to change the single quotes and double quotes and see if it helps?
Also, I’m not really noticing any difference between the mobile logo and desktop logo in terms of design, maybe CSS code would be enough in this case, try adding this code in Enfold > General Styling > Quick CSS:
@media only screen and (max-width:479px) {
.responsive .logo img,
.responsive .logo svg {
max-width: 180px;
}
}
Let us know if this helps.
Best regards,
Nikko
Thanks Nikko! :)
Problem solved.
Hi,
Glad Nikko was able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.
Best regards,
Mike