How to add a class just to the row class, not the wp bootstrap blocks row class
opened this issue · comments
Deleted user commented
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>
Jürg Hunziker commented
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;
}
Deleted user commented
Thank you, I will give that a try for sure!
… On 07 Sep 2019, at 16:24, Jürg Hunziker ***@***.***> wrote:
Hi @Jonofat <https://github.com/Jonofat>
You can use the wp_bootstrap_blocks_row_classes <https://github.com/liip/bootstrap-blocks-wordpress-plugin#wp_bootstrap_blocks_blockname_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;
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#12?email_source=notifications&email_token=AG7HWLMCPACODJWSI75CYGDQIO2QPA5CNFSM4ISX2EZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6EZ43Q#issuecomment-529112686>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AG7HWLMWN7FQK54THOOQGXDQIO2QPANCNFSM4ISX2EZA>.