Closed bsweb closed 3 years ago
Hi @bsweb. You can choose the Custom
layout of the Row block to add and remove Columns manually. Otherwise you can change the default behavior of the row block by defining the following filters:
wpBootstrapBlocks.row.templates
JavaScript filter (see: https://github.com/liip/bootstrap-blocks-wordpress-plugin#wpbootstrapblocksrowtemplates)wp_bootstrap_blocks_row_default_attributes
PHP filter (see: https://github.com/liip/bootstrap-blocks-wordpress-plugin#wp_bootstrap_blocks_row_default_attributes)Managed to get around to looking at this and I can't get it to work, I just get
I am trying to achieve this (tried to paste html but doesn't preview). The parent row works but the issue is when I try and do the children row in the first column that is highlighted
This is the code generated and not liked by WordPress. This is in the first column of the parent row.
<!-- wp:wp-bootstrap-blocks/row {"template":"custom"} --> <!-- wp:wp-bootstrap-blocks/column --> <!-- wp:heading {"level":1,"className":"mb-0 mb-1"} --> <h1 class="mb-0 mb-1">Private Ski Coaching</h1> <!-- /wp:heading --> <!-- wp:heading {"textAlign":"left","className":"subtitle mb-0"} --> <h2 class="has-text-align-left subtitle mb-0">On the Mountain - levels 1 to 6</h2> <!-- /wp:heading --> <!-- wp:heading {"textAlign":"left","className":"subtitle"} --> <h2 class="has-text-align-left subtitle">In the UK - levels 2 to 6</h2> <!-- /wp:heading --> <!-- /wp:wp-bootstrap-blocks/column --> <!-- /wp:wp-bootstrap-blocks/row -->
The recovery options don't work and I have to start again.
Hmm I just recreated your described layout in a dummy WordPress 5.6 instance.
Here's the generated code:
<!-- wp:wp-bootstrap-blocks/row -->
<!-- wp:wp-bootstrap-blocks/column {"sizeXs":8} -->
<!-- wp:wp-bootstrap-blocks/row {"template":"custom"} -->
<!-- wp:wp-bootstrap-blocks/column -->
<!-- wp:paragraph -->
<p>Row 1 Col 1 > Row 1-1 Col 1</p>
<!-- /wp:paragraph -->
<!-- /wp:wp-bootstrap-blocks/column -->
<!-- /wp:wp-bootstrap-blocks/row -->
<!-- wp:wp-bootstrap-blocks/row -->
<!-- wp:wp-bootstrap-blocks/column {"sizeXs":8} -->
<!-- wp:paragraph -->
<p>Row 1 Col 1 > Row 1-2 Col 1 </p>
<!-- /wp:paragraph -->
<!-- /wp:wp-bootstrap-blocks/column -->
<!-- wp:wp-bootstrap-blocks/column {"sizeXs":4} -->
<!-- wp:paragraph -->
<p>Row 1 Col 1 > Row 1-2 Col 2</p>
<!-- /wp:paragraph -->
<!-- /wp:wp-bootstrap-blocks/column -->
<!-- /wp:wp-bootstrap-blocks/row -->
<!-- /wp:wp-bootstrap-blocks/column -->
<!-- wp:wp-bootstrap-blocks/column {"sizeXs":4} -->
<!-- wp:paragraph -->
<p>Row 1 Col 2</p>
<!-- /wp:paragraph -->
<!-- /wp:wp-bootstrap-blocks/column -->
<!-- /wp:wp-bootstrap-blocks/row -->
and here's the HTML output:
It seems to work for me. I can reload the editor without any issues. Can you maybe try to disable all other Gutenberg-related plugins in your setup and check if the issue still occurs? Or do you try to insert a specific block inside the columns which might break the blocks?
I will close this issue since I can't reproduce it. Please reopen it with further information if the issue still exists.
Hi,
The default row contains 2 x col-12 col-md-6 columns but I just want 1 x col-12 column but I can't get rid of the other column. Changing to 0 doesn't work and no option to remove.
Thanks.