Site logo

Archived topic

Confusion with Generate blocks hooks, content and full width containers

3 replies · Started by Jason on April 1, 2022

Viewing posts 1–4 of 4

I am trying to get some elements on mystery site to be full width and having trouble. There are two specific issues:

ISSUE 1
Using a block element with the generate_inside_container hook, I would expect if I set the container to "full width" and the inner container to "full width" for the element to extend edge to edge in the view port. However, it is contained. You can see that here https://www.pettynoise.com

ISSUE 2
I have my home page set to Latest Posts. If I have the Blog Sidebar Layout set to no sidebars, I would expect the content to be full width, however, it is contained. In contrast single post pages have a setting where you can choose no sidebars and set the container to full width. Is there a setting in Generate Press to have Blog and Archive content use full width?

UNRELATED ISSUE
I would like to display archive posts on my home page, however, setting the page to Latest Posts means it will inherit global column display rules fro GP. I would prefer to have a different number of columns on this page. I tired using the WP Query Loop, but that thing is garbage (I read you are making one, any release date in site?). I also tried using WP SHOW POSTS plugin, which works but I see know way to style WP SHOW POSTS with Generate Blocks, I must use CSS. Is there a way besides these two options to dynamically display posts in a different layout from the global GP could layout?

Hi there,

Let's handled one issue at a time and one question per topic.

The width of the inside container hook is restricted by the width of site container:
https://www.screencast.com/t/RGCDcc06s

You can set the blog page to be full width using a layout element:
https://docs.generatepress.com/article/layout-element-overview/#content-1

The display rules would be Blog and Archives.

That would also make the posts blocks full width as well though.

Let me know if this helps :)

Excellent. This make sense and resolves both 1 & 2.

No problem :)

This archived topic is closed to new replies.