Support » Plugin: Bootstrap Blocks » Button block adding extra break tag

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor tschortsch

    (@tschortsch)

    Hi @flaboi850m. Do you mean that the button gets outputted on a new line instead of inline in the previous text? The button gets printed on a new line on purpose. It’s actually wrapped in a <div> which makes it possible to align it horizontally. But you could override the button template by yourself if you want. See this documentation https://github.com/liip/bootstrap-blocks-wordpress-plugin#templates how to do this.

    @tschortsch when I add the button text. A line break is added before the text and i can’t get rid of it.

    Plugin Contributor tschortsch

    (@tschortsch)

    Can you maybe insert your block content (code from the editor) here and tell me on which version of wp-bootstrap-block and WordPress you are?

    Sorry I didn’t see you had replied. The code being output is

    <div class="wp-bootstrap-blocks-button">
    	<a href="" class="btn btn-primary"><br>
    		Test</a>
    </div>

    For some reason after the starting a tag a br tag is being added. I can’t find out where it’s getting added from.

    I’m running WordPress 5.3.4 and Version 2.4.0 of bootstrap blocks

    Plugin Contributor tschortsch

    (@tschortsch)

    Sorry I can’t reproduce this issue in a WordPress 5.3.4 demo instance.

    Here’s my editor content:

    
    <!-- wp:wp-bootstrap-blocks/button {"text":"Test","alignment":"center"} /-->
    

    Which results in this output:

    
    <div class="wp-bootstrap-blocks-button text-center">
    	<a href="" class="btn btn-primary">
    		Test	</a>
    </div>
    

    Have you maybe overwritten the button.php template? Can you insert the exact content of the editor here? (<!-- wp:wp-bootstrap-blocks/button { ... } /-->)

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