- This topic has 7 replies, 3 voices, and was last updated 6 months ago by Andrew.
October 12, 2020 at 12:10 am #1484225Matt
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?
ThanksOctober 12, 2020 at 4:42 am #1484574DavidStaffCustomer SupportOctober 12, 2020 at 5:07 am #1484601Matt
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.
ThanksOctober 12, 2020 at 7:19 am #1484790DavidStaffCustomer SupportApril 26, 2021 at 5:46 am #1749325Andrew
I’m having a similar issue, but I’ve cleared my cache and that hasn’t seemed to resolve it.
I’m trying to add an element (affiliate disclosure) after my header. However, on both desktop and mobile, there’s extra padding after the element (and before the breadcrumbs and main content).
I’ve tried adjusting the padding within the affiliate disclosure element, but the space below it remains too big and doesn’t change at all with the adjustments.
AndrewApril 26, 2021 at 6:04 am #1749338Matt
It looks like you have an empty text block below your affiliate container (right click and ‘inspect’ the space).
Log in to admin > Appearance > Elements > ‘Affiliate Container’ Block. Click the space below your block and use backspace to remove it.
This has got me plenty of times 🙂 Hope it is the fix you are after.April 26, 2021 at 6:15 am #1749351DavidStaffCustomer SupportApril 26, 2021 at 6:38 am #1749390Andrew
That was it. Thank you so much!
- You must be logged in to reply to this topic.