Site logo

Archived topic

Full Width Area above the normal Post

8 replies · Started by Marius on January 31, 2021

Viewing posts 1–9 of 9

Hello,

I have build a site based on the marketer theme.

Now I want a full width area above the normal post. In this area i want to put a table (i have a plugin for the table).

I have put a URL in the field for an example of what i want to do. There you can see the table and then comes the normal post with sidebar.

Is this possible? Maybe with Generateblocks?

Hi,

I'm not sure I fully understand what you mean.

To clarify: Do you want it to be a page hero section that appears after the header, on top of the content and the sidebar?

Also, are you using a shortcode for the table?

If so, you can use the Header Element to place your shortcode, set the header element to full width and set the display rule to "post - all post" so it only applies to normal posts.

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

Alternatively, you can use a Block Element hooked to generate_after_content and place your table's shortcode on a shortcode code block placed inside GB's Container block that is set to full width. You then set the display rule location to "post - all post" so it only applies to normal posts.

More about Block Element here:
https://docs.generatepress.com/article/block-element-overview/

Hi Elvin,

yes the table should be after the header, on top of the content and the sidebar, like on the example page.

And yes, I am using a shortcode for the table.

But I want this only for some specific posts. Not for all.

I have tested this, but it does not work the way i want. The Area above the content is full witdh. But i should sit in the area, where the bog post is.

Ok, now i have used a GB Block with Inner container contained witdh. But then the width is like the text, not like the white space in which the blog post sits.

Maybe this is to complicate.

I can not publish the post in this form, it is still a draft.

Hi there,

when you select the Container Block you have the option to increase the Container Width. You can increase this to compensate for any content padding in the theme.

Yes, but on my site, the posts, pages and sidebar are in a white area. And the Block element I am trying to build is not in such a white space.

I have insert the url, so you can see the white areas.

So the Container should be the same width as the site content ? And have a white background ?

If so:

Set the Container Blocks width to Contained so its background only fills the width of the site container. Then give the block some top and bottom margin to create the space between it and the content.

This archived topic is closed to new replies.