Hello, what is the latest CSS for using a different logo for mobile?
Thanks much,
Pete
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');
Hi pleinbach,
Did you get it working with Guenni007’s suggestion or do you need more help?
Best regards,
Victoria
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.
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