[Resolved] Container Padding and Elements using Hooks

Home Forums Support Container Padding and Elements using Hooks

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1484225
    Matt

    Hi Guys,

    I’m using GP3 and Generate Blocks to build out a Woocommerce Site. I am wanting to use the Elements “Block” to create a full-width banner that sits below the main site header. My page is setup very much like your hooks documentation (ie. secondary nav -> main header section w/ logo -> primary nav -> content) – https://docs.generatepress.com/wp-content/uploads/2018/07/hooks-staticpage.png

    I have removed all padding from all containers in the “element” that i have created and am adding it to the ‘generate_after_header’ hook. However, there is still spacing around the image when viewed in the front end. This spacing can be removed by adjusting the content padding (https://docs.generatepress.com/article/content-padding/) but this isn’t ideal as it removes the content padding from all pages in the site.

    I would have thought the ‘generate_after_header’ hook would have placed this element before the content container and not in it, as it seems that the ‘generate_inside_container’ hook is designed for that. Am I missing something here or is that as intended?

    Any tips on how to achieve the result I’m after… which is a header element that can be conditionally attached to any page/ archive/ category archive etc and display at full width?

    Thanks

    #1484574
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to your site where i can see the padding issue?

    #1484601
    Matt

    Hi David,

    Thanks for your response. The site is currently only in local dev and I just re-added the content padding (Customise > Layout > Container > Content Padding) to double check and there is now no padding around my heading. This leads me to believe that there was some caching going on in chrome. Sorry.

    Thanks

    #1484790
    David
    Staff
    Customer Support

    Glad to hear you got it resolved.

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