Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1226631

    Hello, what is the latest CSS for using a different logo for mobile?

    Thanks much,
    Pete

    #1226649

    and you really want to change the logo only for mobile devices – or do you mean for small screen widths?

    for mobile devices put this to your child-theme functions.php

    add_filter('avf_logo','av_change_mobile_logo');
    function av_change_mobile_logo($logo){
        if(wp_is_mobile()){
          $logo = "/wp-content/uploads/mobile-logo.png";
        }
        return $logo;
    }

    and if you want to have on mobile devices a different transparency logo:

    function av_change_mobile_transparency_logo($header){
        if(wp_is_mobile()){
            $header['header_replacement_logo'] = "/wp-content/uploads/mobile-transparent-logo.png";
        }
        return $header; 
    }
    add_filter('avf_header_setting_filter','av_change_mobile_transparency_logo');
    #1226824

    Hi pleinbach,

    Did you get it working with Guenni007’s suggestion or do you need more help?

    Best regards,
    Victoria

    #1228913

    Thanks @Guenni007, appreciate the feedback. @Victoria, I will try his suggestion unless there’s an easier custom CSS I can add without updating a PHP file. Thanks all.

    #1229155

    Hi,

    It’s not possible to set or replace an image with CSS unfortunately, the you would have to set it as a background to an element. I would advise to try the solution which @guenni007 posted.

    Best regards,
    Rikard

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.