Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Setting defaults too inner container using function.

  • Good Morning,

    Just purchased both generate premium and blocks and looks great on first inspection.

    I have been trying to set the default inner container padding, so I dont have to set it on a individual container basis or select a global style.

    Using the function below, is there a way too target the inner container so everytime i add one default padding is set.

    // Cancels the GP 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;
    } );

    Thanks in advance

  • Hi there,

    as a Pro user.
    You can:

    1. Create a Global Style to control your padding.
    2. then create a Local Pattern and apply your local styles.

    Now you can simply add the appropriate local pattern, and if in the future you want to modify them just update the Global Styles.

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