Site logo

Archived topic

Different page hero for home, page and post

5 replies · Started by Annamari on February 22, 2021

Viewing posts 1–6 of 6

Hi,

is it possible to create a different page hero element for the homepage, pages and posts?
On pages, I'd like to show the page title and excerpt on the background image, on posts the title and post meta, and on the home page some custom text and buttons.

Thank you for any insight!

Annamari

Hi there,

yes, for sure - you can create as many Header Elements as you like. You just need to set unique Display Rules for each one.

Examples:
Home Page - display rule: Front Page.
All Posts - display rule: Posts > All Posts
All Pages - display rule: Pages > All Pages

One thing to be mindful of is Display Rules that have a Global Scope such as the Entire Site. Heres an example:

1. Global Header - Display Rules: Entire Site .... used for the Entire Site.
2. Post Header - Display Rules: Posts > All Posts .... just my Posts.
3. Specific Pages - Display Rules: Pages > A Specific Page.

However ... for this to work i would need to edit the Global Header and set some Exclusions in the Displays Rules which in this case would be:
Exclude: Posts > All Posts
Exclude: Page > A Specific Page.

More info on Header Element here: https://docs.generatepress.com/article/header-element-overview/

Let us know if you need help with the specific setup.

Thank you, David, this sounds good. Could you show me some guidance about placing the menu over the header image?

For sure... in your Header Element there is a Site Header tab. Go to that, and check the Merge with Content option.

This will provide an option to change the Site Header colors and a check box to edit the Navigation colors.
Here you can change the backgrounds to transparent and change the text link colors if you wish.

This will only apply those colors and the merge to that particular Header Element.

Thanks, David, it works! :)

Glad to hear that!

This archived topic is closed to new replies.