Hello, I have just updated from Enfold 4.2 to Enfold 4.2.6 and the following code (added in functions.php) is not working anymore.
I am also using WPML.
Thanks for your help.
/*
* Use different logo on mobile AND different in french and english
*/
add_filter(‘avf_logo’,’av_change_logo’);
function av_change_logo($logo)
{
if(wp_is_mobile() )
if(ICL_LANGUAGE_CODE==’en’){
$logo = “https://womeninstem.ingeniumcanada.org/wp-content/uploads/2018/02/logo.png”;
}
elseif(ICL_LANGUAGE_CODE==’fr’){
$logo = “https://womeninstem.ingeniumcanada.org/wp-content/uploads/2018/02/Hero-Logo-Grey.png”;
}
return $logo;
}
Hey IngeniumCanada,
Please refer to the below links
For different logo on mobile please use the below code
@media only screen and (max-width: 480px) {
.logo img { opacity: 0; }
.logo a { background-image: url(https://kriesi.at/wp-content/themes/kriesi/images/logo.png); background-repeat: no-repeat; background-size: contain; background-position: 50% 50%; }}
Best regards,
Vinay
Hello Vinay,
I added the code above to my Quick CSS in Enfold (en)
then I also added it to my Quick CSS in Enfold (fr) replacing the url with the french logo url
I now have the mobile logos appearing everywhere : in Desktop AND in Mobile
My need is to use 4 different logos : 1 for Desktop in English, 1 for Desktop in French, 1 for Mobile in English, 1 for Mobile in French.
Can you please help me ?
Can you also tell me, if I should keep or not the code I added in functions.php
Thanks
Hi,
Please remove the code you added to functions.php
In my previous code change the
background-position: 50% 50%;
to
background-position: 0% 50%;
I tried to login and check the code but the login URL does not work. If you till have any issue please provide us working login credentials.
Best regards,
Vinay
Thanks a lot Vinay ! It’s working fine now !
Hi,
I’m glad you were able to get this taken care of. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon