Tagged: different logo, transparent header
Hello,
I want a different logo on a page and all portfolio items.
I get to work with the normal header but if transparency is on it works for the sticky header when you scroll but not for the transparent header see: https://www.zinkwaliteitsborging.nl/cursus/kwaliteitsborging-bouwplantoetsing-3/
code i used:
`add_filter(‘avf_logo’,’av_change_logo_img’);
function av_change_logo_img($img)
{
if( is_page(‘1005973’) )
{
$img = “https://www.zinkwaliteitsborging.nl/wp-content/uploads/2023/01/Academy-logo.svg”;
}
if(is_singular(‘portfolio’))
{
$img = “https://www.zinkwaliteitsborging.nl/wp-content/uploads/2023/01/Academy-logo.png”;
}
return $img;
}
Hi Tim,
For transparency logo you’ll need to use avf_logo_subtext instead, please try this code instead:
add_filter('avf_logo_subtext', 'av_change_transparency_logo_img');
function av_change_transparency_logo_img($sub) {
if( is_page('1005973') ) {
$sub = '<img src="https://www.zinkwaliteitsborging.nl/wp-content/uploads/2023/01/Academy-logo.svg" class="alternate" alt="" title="alternate logo">';
}
if(is_singular('portfolio')) {
$sub = '<img src="https://www.zinkwaliteitsborging.nl/wp-content/uploads/2023/01/Academy-logo.png" class="alternate" alt="" title="alternate logo">';
}
return $sub;
}
Hope it helps.
Best regards,
Nikko
Thnx it did :)