-
AuthorPosts
-
March 13, 2018 at 10:30 pm #926305
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;
}March 14, 2018 at 11:22 pm #926910Hey 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,
VinayMarch 15, 2018 at 1:11 am #926960Hello 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
ThanksMarch 15, 2018 at 9:27 am #927145Hi,
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,
VinayMarch 19, 2018 at 6:09 pm #929199Thanks a lot Vinay ! It’s working fine now !
March 19, 2018 at 6:11 pm #929201Hi,
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 -
AuthorPosts
- The topic ‘Different logos in Mobile and also different in English and Francais’ is closed to new replies.
