Site logo

Archived topic

Choose header logo depending on post category or page ID

7 replies · Started by William on April 30, 2022

Viewing posts 1–8 of 8

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.

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

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.

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.

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

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. :)

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.

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

This archived topic is closed to new replies.