Black Friday: $40 off GeneratePress One. See pricing

Archived topic

Displaying Header Image without text

8 replies · Started by Viktor on August 19, 2018

Viewing posts 1–9 of 9

Hi there,

try adding an empty span tag in the Hero content e.g <span></span>

I'll pass this onto Tom as i cannot see the warning that used to appear on Page Headers when the content was empty....

sure adding <span></span> does work, but then I have to specify exact Padding for each image to display it at full size.

Hi there,

that is correct as the image is set as a CSS background image with the size set to cover, so you need to define the padding required to display more of the image.

Your alternative would be to add the image in the content using an image tag which would then be displayed at the actual size without padding.

got it
thanks

You're welcome.

I prefer an empty HTML comment to an empty span, seems cleaner: <!-- Page Hero -->

I understand the logic here, but one of the useful things about the page header module is that it allows people with fairly limited skills to upload an image, add some text and then have a nice header. But if they don't want text in the header, they're left scratching their heads. Why isn't my header showing?

As it stands now, without content, it won't generate any HTML at all, so you can't force a default height.

It would be nice if there were either a flag ("Always show header") or a hook (generate_hero_add_after_content) so then as a site builder, you could make this automatic for an end user and not have to instruct them to add an HTML comment in order to get this to work.

Can you open a new topic for your question?

This topic is from 2018 which is quite old.

Thanks!

This archived topic is closed to new replies.