-
AuthorPosts
-
July 1, 2022 at 10:22 am #1356998
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 iconsthank you
July 2, 2022 at 12:39 pm #1357055Hey 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,
NikkoJuly 2, 2022 at 1:24 pm #1357069Hi Nikko!
Thanks for your help, but don’t work.July 2, 2022 at 1:30 pm #1357070/*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.phpJuly 2, 2022 at 2:46 pm #1357077Hi 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,
NikkoJuly 4, 2022 at 9:52 am #1357177Thanks Nikko! :)
Problem solved.July 4, 2022 at 1:26 pm #1357198Hi,
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 -
AuthorPosts
- The topic ‘Mobile logo adjust’ is closed to new replies.
