Site logo

Archived topic

How to activate a different per-page hero on non-home pages

14 replies · Started by MICHAEL on April 13, 2021

Viewing posts 1–15 of 15

Hi. I've got my https://whatcommilliontrees.org adaptation of your Donate site library template pretty well set up now, thanks to timely help here, which I appreciate greatly. :)

Currently, the same hero image appears on all pages. I've tried loading a Featured image on a non-home page, but it does not swap in. Is there an easy way to activate an equivalent (and equal sized as the current hero) different hero image per page? I'd still want some pages to retain the current hero, so would like to control this on a page-by-page basis. Thanks.

Hi there,

You will need to create a separate page and assign it specifically to the page you have in mind.

Then make sure to add that page to the exclusion rules of the other header elements/page hero.

Let me know if this helps :)

Thanks, but I have no clue HOW to do what you said, since I am relatively a novice. Any step-by-step instructions available?

This article shows you step by step on how to create a page hero:
https://docs.generatepress.com/article/how-to-create-a-page-hero/

Or you can consider using a plugin like this to duplicate the page hero you have in mind:
https://en-ca.wordpress.org/plugins/duplicate-page/

Then change the desired settings like background type:
https://docs.generatepress.com/article/how-to-create-a-page-hero/#step-2-choose-a-background

Then apply the display rules as I mentioned above.

Hmmm. I'm wondering if you misunderstood my intent. All the thousands of various GeneratePress websites in the world that show a different full-width, header-merged hero image on each website page have to go through these steps PER different hero image??

I read the doc. I tried turning on the Featured Image option on a non-home page, but it did not swap the Featured Image into the merged hero area. It appeared below the hero. That is why I am confused.

Can you link me to the specific page you are referring?

I see three header elements in your site. Looking at the display rules, the Page Headers header element would apply to a non-home page and it's using a static/custom image.

Happens on any of he non-home pages. If I choose a Featured image for the page, it appears below the merged hero, not replacing it. See https://whatcommilliontrees.org/donate/ as an example, which I will keep with that problem as is for a few minutes to demonstrate to you. Thanks.

Hi Michael,

1. Just to make sure you change the background image to featured image, it's currently still set to custom image. Then also disable the default feature image.
https://www.screencast.com/t/YWPjuzqL

2. I checked a random page, it doesn't not have a featured image set yet, so make sure you have all the featured image set in advance.
https://www.screencast.com/t/TCAorniaKFB

Thanks, Okay I will do that. Does it mean that for the Home page I would also set the Featured image and just choose the same hero image it has now (which is the one I want)? Or is the Home page treated differently in this?

My explanation above actually answers the question:

I see three header elements in your site. Looking at the display rules, the Page Headers header element would apply to a non-home page and it’s using a static/custom image.

So any static pages you've created would have the Page Headers header element apply and it's using a static image:
https://www.screencast.com/t/GlT7tlG0b1rq
https://www.screencast.com/t/sskaD1X9zc

If you want to use the featured image as the background image, then you actually have to select Featured image under the background image option instead of Custom Image:
https://docs.generatepress.com/article/how-to-create-a-page-hero/#step-2-choose-a-background

Let me know if this answers your question.

Okay, thanks you two. :) It seems I solved it now with your extra help. The Donate page is a successful test of it. Tomorrow I can turn on other featured images for other pages.

Does it mean that for the Home page I would also set the Featured image and just choose the same hero image it has now (which is the one I want)? Or is the Home page treated differently in this?

No - if you do that, then the current home page hero content would be replaced with title only.

You can only share a page hero when the content in it is exactly the same like the post/page title.

So what you want here is:

1. A header element specifically for the home page.
2. A header element for static pages.
3. A header element for single posts (if it's different than #2).

Glad to hear.

This archived topic is closed to new replies.