Tagged: header, logo, svg, transparency
Dear @Ismael,
you helped me out with a piece of code (see post #1484511) and it is working as expected:
function avf_no_inline_svg_mod($attachment_id, $url) {
$logo_url = avia_get_option( 'logo' );
$logo_url_transparency = avia_get_option( 'header_replacement_logo' );
if ($url && $url == $logo_url || $url && $url == $logo_url_transparency) {
return true;
}
return false;
}
add_filter('avf_no_inline_svg', 'avf_no_inline_svg_mod', 10, 2);
With this snippet added to functions.php the logo of my page is not rendered as path but instead loaded as an SVG image. Works for normal logos and the ones set in the transparency settings.
However, on pages with transparent header but smaller screen the normal logo is loaded. Not the transparent one. Any idea why? (Maybe helpful: I keep the transparent header for mobile menu due to a change in avia-sticky-header.js – code from the forum)
I appreciate your help.
Kind regards,
Daniel
Hey Daniel,
Thank you for the inquiry.
The same SVG logo image is displayed on small screens when we checked the previous site. Would you mind providing a screenshot?
Best regards,
Ismael
Hi Ismael,
on an other page I have the header on mobile sticky and transparent too (avia-sticky-header.js). See link.
Hi,
Did you remove the filter? The markup is the same when we checked. Please check the screenshot in the private field.
Best regards,
Ismael
No, I did not remove it. Just go below 990px width. Than the alternate logo part is hidden by display: none
.
The longer I think about it I think the problem isn’t the filter. It is because of the changes in avia-sticky-header.js and that those aren’t reflecting the two different logo types …