Archived topic
site header for archives pages
8 replies · Started by paolab on April 30, 2018
Hi,
I'm using a sticky logo for the blog which appears when scrolling down and I'd like to display a static one only in archives taxonomy pages.
I've tried with Page headers widget but doesn't work.
Do have any advice or workaround to solve it?
Hi there,
Not quite sure if I understand.
The page you linked currently doesn't have a navigation or navigation logo.
Can you explain a bit more?
Let me know.
Hi Leo,
I have site logo but I think you can't see it because there are enough content in the page.
So, I need to use another logo site in the tag pages
http://it9.siteground.eu/~nesthing/paisanosmodernos/home/tag/plantas/
I've tried to change with hooks using that:
https://generatepress.com/forums/topic/changing-headers-or-deleting-headers/#post-98390
but it displays both logos in all the pages.
Could you help me?
P.
Sorry I'm really not sure what I'm looking at here as I can't seem to navigate to other pages with your current set up.
The method you linked is old. Now we actually have a filter for you to change the logo with:
https://docs.generatepress.com/article/generate_logo/
Let me know if this helps.
Hi Leo,
I'm sorry maybe I haven't explained correctly.
I have a logo site. You can see it when you scroll down
http://it9.siteground.eu/~nesthing/paisanosmodernos/home/
This works perfectly.
But I would like to change the behaviour of the logo site only in tags pages
http://it9.siteground.eu/~nesthing/paisanosmodernos/home/tag/plantas/
Here I want to display a static logo. It's the same logo but static. How could I get this?
I hope that makes sense.
Paola.
Is there a logo added here?
https://docs.generatepress.com/article/adding-header-logo/
No, I don't have any logo in here because it appears fixed in all pages.
I'm using main navigation, sticky.
Where I can add this code?
add_filter( 'generate_logo','tu_custom_about_logo' );
function tu_custom_about_logo( $logo )
{
// If we are on the about page, set our custom logo
if ( is_page( 'about' ) )
return 'URL TO OUR LOGO IN HERE';
// Or else, set the regular logo
return $logo;
}
One of these methods here: https://docs.generatepress.com/article/adding-php/
Code Snippets is the easiest if you aren't using a child theme.
On a second thought, try uploading a logo in site identity, then add this snippet to remove the header on every page except tags page:
add_action( 'after_setup_theme','lh_remove_header' );
function lh_remove_header() {
if ( !is_tag() ) {
remove_action( 'generate_header','generate_construct_header' );
}
}