Archived topic
Insert Box in GP Elements
3 replies · Started by Markus Kitroschat-Vogt on September 27, 2020
Dear GeneratePres-Team,
On the front site oft my site https://www.radtouren-checker.de/ I've got a header image which I've inserted via GP Elements.
Inside this element should be contained a newsletter box. I can insert the newsletter via shortcode but without a box. Is there any possibility to put in a box (kinda like a widget box)?
Thanks!
Kind Regards,
Markus
Hi there,
you can use some CSS like this to add a background color with some padding:
.page-hero .mailster-form {
padding: 20px;
box-sizing: border-box;
background-color: #ccc;
}
If you want greater styling control, and the header element doesn't require any Dynamic content such as Post Title or Post meta - you may want to use the Block Element instead:
https://docs.generatepress.com/article/block-element-overview/
You can hook in custom built Blocks using GenerateBlocks in the after_header hook to position it where the Header Element appears.
Ok, grad, I fixed it due to the last hint. Thanks!
Glad to be of help.