[Resolved] Choose header logo depending on post category or page ID

Home Forums Support [Resolved] Choose header logo depending on post category or page ID

Home Forums Support Choose header logo depending on post category or page ID

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2205135
    William

    Struggling with making logo displayed depend on post category or page ID. I’m no programmer but I think I understand PHP needed for conditional selection of logo image. But I don’t understand how to integrate it into website. I did a similar thing on an older site, code now appears in “Legacy Hooks | Before Header Content” and that works fine. But I don’t understand how to do it in development site which uses current version pf GP.

    #2205359
    David
    Staff
    Customer Support

    Hi there,

    try this:

    1, Create a new Header Element in Appearance > Elements

    2. On the Site Header tab, add your logo

    3. Set the Display Rules to the specific location eg. Post Category -> Category Term or Page -> Page Name

    #2205494
    William

    I’m trying to start simple here but not doing well …
    Cleared my browser cache.
    Under site identity I left the logo blank.
    Under Appearance > Elements I added a Header.
    On Site Header tab I added a header element, No Merge, Default location.
    On the Page Hero tab I set Background Image to custom and selected a header image from my Media Library, other settings at default.
    On Display Rules I set location Rules to Entire Site.
    Result: No logo appears on any page.

    #2205779
    Ying
    Staff
    Customer Support

    Hi William,

    You didn’t mention there’s a logo been uploaded in the header element, can you make sure the logo is uploaded?
    https://www.screencast.com/t/cgZBEzEh2MGk

    If you want the background image to show, you’ll need to add something to the content area of the page hero tab, and set some top/bottom padding, eg. 200px.

    #2205863
    William

    So my screen doesn’t look like yours!

    I don’t see the Site Logo or Mobile Header Logo fields. Link is to my screen for the Header element on my installation.

    If it makes a difference, I’m developing using localhost.

    https://photos.app.goo.gl/iUbDxFfWdATo5WmXA

    #2205946
    Fernando
    Customer Support

    Hi William,

    To make the Site Logo field appear, you’ll need to have a logo set in Appearance > Customize > Site Identity: https://share.getcloudapp.com/yAuKmY68

    With that said, can you confirm if you have a logo set there?

    Kindly let us know. 🙂

    #2206299
    William

    That was the problem! Now appears to work as I wish.

    I had removed the logo in Appearance | Customize. After selecting a logo in Appearance the Site Logo selection box appears and follows the Display Rule I set.

    Thanks! You GP folks provide great support.

    #2207083
    Fernando
    Customer Support

    You’re welcome William! Glad to be of assistance! Feel free to reach out anytime you’ll need assistance with anything else. 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.