Site logo

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

Home Forums Support [Resolved] How to activate a different per-page hero on non-home pages

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

  • This topic has 14 replies, 3 voices, and was last updated 5 years ago by Leo.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1733343
    MICHAEL

    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.

    #1733383
    Leo
    Staff
    Customer Support

    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 🙂

    #1733387
    MICHAEL

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

    #1733389
    Leo
    Staff
    Customer Support

    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.

    #1733392
    MICHAEL

    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??

    #1733393
    Leo
    Staff
    Customer Support

    Maybe I don’t quite what you are struggling with.

    Sounds like the featured image option is what you are looking for?
    https://docs.generatepress.com/article/how-to-create-a-page-hero/#step-2-choose-a-background

    That way it the page hero will use the featured image as the background image automatically.

    Have you gone through the article? Any specific part you are wondering about?

    Let me know 🙂

    #1733398
    MICHAEL

    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.

    #1733403
    Leo
    Staff
    Customer Support

    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.

    #1733407
    MICHAEL

    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.

    #1733408
    Ying
    Staff
    Customer Support

    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

    #1733410
    MICHAEL

    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?

    #1733411
    Leo
    Staff
    Customer Support

    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.

    #1733414
    MICHAEL

    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.

    #1733415
    Leo
    Staff
    Customer Support

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

    #1733416
    Leo
    Staff
    Customer Support

    Glad to hear.

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