Archived topic
Automated padding of 40px - it returns!
1 reply · Started by Simon on November 15, 2021
Hi
Hoping you can help. A year or so ago I contributed to and took from a support thread a code snippet (below) to prevent the GP 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 GP 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 prevent it as before. (One question is should the code apply to the container or inside-container? - but it did work before.)
Thank you.
// It 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;
} );
Hi there,
Can you open a support topic in GB's support forum?
https://wordpress.org/support/plugin/generateblocks/
Thanks!