• Resolved webappster

    (@webappster)


    Love the plugin. One issue… When adding a container, the plugin creates containers with “wp-bootstrap-blocks-container container mb-2” classes. The mb-2 isn’t desired. Can this be removed?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter webappster

    (@webappster)

    Never mind. Noob user error. I see that the default option for margin is “small”. Probably should be set to “none” by default.

    Plugin Contributor tschortsch

    (@tschortsch)

    You’re right. It would probably make sense to disable it by default. Let’s see if we can change the default value in a future release. But since this would be a breaking change we probably won’t do it that quickly.

    Hi @tschortsch

    Great plugin, but I also have this annoying problem, and I cannot find where this ‘default setting’ can be changed.

    How can I remove the mb-2 from my containers please?

    Plugin Contributor tschortsch

    (@tschortsch)

    You can define the default value with the wp_bootstrap_blocks_container_default_attributes PHP filter documented here: https://github.com/liip/bootstrap-blocks-wordpress-plugin#wp_bootstrap_blocks_container_default_attributes

    In your case you need to define the following filter:

    add_filter( 'wp_bootstrap_blocks_container_default_attributes', 'my_container_default_attributes', 10, 1 );
    
    function my_container_default_attributes( $default_attributes ) {
        $default_attributes['marginAfter'] = 'mb-0';
        return $default_attributes;
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘mb-2 class added to container’ is closed to new replies.