[Resolved] Create a full width post header when using a boxed layout

Home Forums Support [Resolved] Create a full width post header when using a boxed layout

Home Forums Support Create a full width post header when using a boxed layout

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2375913
    Daniel

    Hi there!

    I have a 1200px wide design with 40px margins on each side.
    For the single post layout I want to create a header containing the title, meta and date. This header I want to take up the 1200px width.

    I tried to create a content template but when using it in single post, the header does not go all the way to the sides as it respects the 40px margins on each side.

    I changed the method and have opted to use a hook (inside_site_container) for the header of each post. With this I get the width I want but in the content of the post the title and meta are shown in addition to the ones I have added to my custom header.

    With the GP hide elements option I can only act on the title, not the meta.

    I need advice about the best way to proceed: do I use the content template and add a -40px margin to the header to make it reach the ends? is it better to use the hook option and then hide the title and meta with some snippet? any other suggestions?

    Thanks!

    #2375917
    Fernando
    Customer Support

    Hi Daniel,

    For reference, can you share the link to the page in question?

    You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    #2375936
    Daniel

    Hi Fernando!

    It’s a site I’m working on at the moment, you’ll have to use https://www.skipdns.link/ with the IP that I provide you.

    In the example you will see my custom header in red, made using the hook inside_site_container, and then the original header of the post.

    #2375938
    Fernando
    Customer Support

    To clarify, have you tried using a Block Element – Page Hero? Reference: https://docs.generatepress.com/article/block-element-page-hero/

    You should be able to create such a section that’s full width or contained to 1200px depending on your Container Block settings.

    Let us know.

    #2375950
    Daniel

    Perfect!
    That’s the exact option I needed.

    Thanks!

    #2376869
    Fernando
    Customer Support

    You’re welcome Daniel!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.