Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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;
    }

    #926910

    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

    #926960

    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

    #927145

    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

    #929199

    Thanks a lot Vinay ! It’s working fine now !

    #929201

    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Different logos in Mobile and also different in English and Francais’ is closed to new replies.