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

    thank you

    #1357055

    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

    #1357069

    Hi Nikko!
    Thanks for your help, but don’t work.

    #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.php

    #1357077

    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

    #1357177

    Thanks Nikko! :)
    Problem solved.

    #1357198

    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

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Mobile logo adjust’ is closed to new replies.