Site logo

Archived topic

Extend Element "Transparent Header" to Blog

8 replies · Started by Daniel on June 9, 2019

Viewing posts 1–9 of 9

Hello,

I am using the Demo "Branded" and I would like to use the Element "Transparent Header" on posts and Blog page.
The "Transparent Header" is an Element that created by default on Demo.

I have tried with all possible combination in "Display Rules" tab.

Please, help me to extend the Element created to the Blog page and posts.

Thank you!

Hi there,

you would need to create a new Header Element for the single post and one for your blog.

This example here shows the settings for a merged header that will work on a single post. You won't need the PHP or CSS unless you want to add the author details to the header element:

https://docs.generatepress.com/article/page-hero-examples/#example-2

You can create another one for the GP blog page. The only difference being is you would need to:
1. Add a Blog title manually in the header element eg.
<h1>Blogo</h1>
2. Select a Custom Image for the background instead of the Featured Image.

I would like to know why one Element works fine on the pages but not on the posts... I dont get that the same element (or other Element) dont works fine in both.

Does the Header Element for your Posts contain anything in the content area?
If not the add a HTML comment for the header to display eg.

<!-- Featured image hero -->

This won't display on the frontend but will force the header to be displayed.

Yes, I have introduced "<!-- Featured image hero -->" but not show it.

I do not get activate Element in posts, but yes in pages.

So what issue(s) are you having?

Looks like there is a page hero applied to single posts already with merged option turned on but no content in it.

This archived topic is closed to new replies.