Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The topic ‘Different logo on pages and posts (transparent header)’ is closed to new replies.
Hi there
I’ve been asked to add a different logo to pages and posts within the existing site. I’ve used the following before
add_filter('avf_logo','av_change_logo_img');
function av_change_logo_img($img)
{
if( is_page('NAME') )
{
$img = "URL";
}
return $img;
}
But this only worked on the standard header. This site uses transparent headers so I would need it work for that option.
Is there a way to do this and if so can I target pages and posts too?
Thanks
Richard
Hey Richard,
You will need to use two filters, one for the standard logo and one for the transparent logo, please see this post.
Best regards,
Mike
Hi Mike
Sorry for the delay in replying and I managed to get that working from the thread. The only bit I need to fix now is for the page to use the same logo on the mobile view. See URL (switch between desktop and mobile)
Thanks
Richard
Hi,
When I check the svg logo is the same for mobile & desktop, but on desktop your header is transparent so the background color allows the light third line of text to be seen, while the mobile header is white so you can’t see the text.
You could add this css to make the third line of text green like the second line on mobile:
@media only screen and (max-width: 767px) {
.av-contains-svg #Layer_1 .cls-3 {
fill: #b0cf6b;
}
}
Best regards,
Mike
Excellent and a super easy fix — doh, why didn’t I think of that.
Super
Thanks
Richard
Hi,
Thanks for the update. Please let us know if you should need any further help on the topic, or if we can close it.
Best regards,
Rikard
Be careful with the Illustrator standard classes (cls-x). If you also have it elsewhere on your page (e.g. through an inline SVG file), the last CSS rule counts.