[Support request] site header for archives pages

Home Forums Support [Support request] site header for archives pages

Home Forums Support site header for archives pages

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #563926
    paolab

    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?

    #564193
    Leo
    Staff
    Customer Support

    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.

    #569331
    paolab

    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.

    #569816
    Leo
    Staff
    Customer Support

    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.

    #571561
    paolab

    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.

    #571617
    Leo
    Staff
    Customer Support
    #571654
    paolab

    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;

    }

    #571682
    Leo
    Staff
    Customer Support

    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.

    #571767
    Leo
    Staff
    Customer Support

    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' );
        }
    }
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.