Site logo

Archived topic

I don't have any hero image on my blog page

3 replies · Started by Julie on August 23, 2022

Viewing posts 1–4 of 4

Hello,

I am a brand new user of GP premium with the Mellow theme.
I choose a static home page, and choose another page for the blog. The featured image show very well on the different pages, except for the blog one. There is only a black background with site tittle, menu, et page tittle.
I tried to set up a new element for this page (adding an exception on the Site Hero element), but as it didn't change anything, I got back to the initial setting of the elements.
What can I do to make the featured image select on the blog page, appear on the web site ?

NB : I'm creating a brand new website, so I'm starting from zero, there is no pluggin except GP ones

Thank you,

Julie

Hi there and welcome :)

you had the correct idea. To cover:

1. Edit the Site Hero block element and exclude the Blog from the Display Rules.

2. Create a new Block Element - Page Hero for your Blog page, and set its Displays only to blog. See below

NOTE: WordPress ignores any metabox values set in the ediot of the Blog page, so thats the Featured Image and Custom fields etc. So for this hero the content needs to be static.

To make that easier for you when you create the block element, from the 3 dot menu, select the Code editor view and paste in this code:

<!-- wp:generateblocks/container {"uniqueId":"4bdddf1d","paddingTop":"455","paddingRight":"70","paddingBottom":"285","paddingLeft":"70","paddingTopMobile":"140","paddingBottomMobile":"140","backgroundColor":"#000000","bgImage":{"id":98,"image":{"url":"https://gpsites.co/mellow/wp-content/uploads/sites/31/2018/11/person-984282_1920-e1542442720578.jpg","height":1070,"width":1905,"orientation":"landscape"}},"bgOptions":{"selector":"pseudo-element","opacity":0.5,"overlay":false,"position":"center top","size":"cover","repeat":"no-repeat","attachment":""},"innerZindex":1,"isDynamic":true,"blockVersion":2,"className":"page-hero"} -->
<!-- wp:generateblocks/headline {"uniqueId":"cbeb28df","element":"h1","alignment":"center","textColor":"#ffffff","marginBottom":"0","className":"","gpDynamicTextReplace":"Hello World"} -->
<h1 class="gb-headline gb-headline-cbeb28df gb-headline-text">Blog</h1>
<!-- /wp:generateblocks/headline -->
<!-- /wp:generateblocks/container -->

Then switch back to the Visual Editor and change the title text and background image.

Hello David,

Thanks for your welcome.

It works very well after I chose "Banner" inside the element.

Thank you very much,

Julie

Glad to hear that is working !

This archived topic is closed to new replies.