Automated padding of 40px – it returns!
-
Hi
Hoping you can help. A year or so ago I contributed to, and then took from, a support thread here a very useful code snippet (below) that prevents the GB default 40px padding around every container. It has worked well.
BUT… now suddenly the padding is returning – to existing posts which were designed without it. Maybe it’s something in a recent GB update that has stopped the code snippet working? I can’t think of another reason.
So I’m wondering if you can help in identifying why, and help me to continue to prevent it as before. (One question about the code below is whether it should apply to the container or inside-container? – but either way, it worked before.)
Thank you.
// This works to cancel the automated 40px padding. add_filter( 'generateblocks_defaults', function( $defaults ) { $defaults['container']['paddingTop'] = '0'; $defaults['container']['paddingRight'] = '0'; $defaults['container']['paddingBottom'] = '0'; $defaults['container']['paddingLeft'] = '0'; return $defaults; } );
(The linked page is one of those where the padding has suddenly reappeared. It was not there before.)
The page I need help with: [log in to see the link]
- The topic ‘Automated padding of 40px – it returns!’ is closed to new replies.