liip / bootstrap-blocks-wordpress-plugin

Bootstrap Gutenberg Blocks for WordPress

Home Page:https://wordpress.org/plugins/wp-bootstrap-blocks/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add a class just to the row class, not the wp bootstrap blocks row class

opened this issue · comments

When I create a row, there are 2 divs created, one with wp bootstrap blocks row and then underneath that the normal boostrap row.

How can I add a class to the normal <div class="row"></div>?

I tried adding a class through the options in Gutenberg but it adds the class to wp bootstrap blocks instead of just row.

I want it to look like <div class="row justify-content-between"></div>

Hi @Jonofat

You can use the wp_bootstrap_blocks_row_classes filter for that:

add_filter( 'wp_bootstrap_blocks_row_classes', 'my_custom_row_classes', 10, 2 );

function my_custom_row_classes( $classes, $attributes ) {
    array_push( $classes, 'justify-content-between' );
    return $classes;
}