• Hi there,

    I’ve searched and tried some plugins for Bootstrap shortcode, and finally using this one. Simple, clean and easy to use, I love your plugin. Thanks for your hard work!

    On my website, I am using Advanced Custom Field Pro => Flexible Content (here). However, in this case, the plugin cause a HTML error. Here is the sample code I am seeing:

    <div class="row">
    <div class="col-md-6"></p>content...</div>
    <div class="col-md-6"></p>content...</div>
    </div>
    

    Note that closing P tag.

    The reason of this error, because the field from Advanced Custom Field run the “bs_fix_shortcodes” function only once. So it fixes empty P tag for the [row] shortcode, but not for [column] shortcode (or any kind of nested shortcode).

    After few hours searching, I could fix it by edit the plugin core file.. Here I want to share and hopefully this patch will be applied in the next version.

    File: bootstrap-shortcodes.php

    function bs_row( $atts, $content = null ) {
    ...
    $data_props = $this->parse_data_attributes( $atts['data'] );
    
    <strong>$content = bs_fix_shortcodes($content);</strong>
    }
    

    Apply this bs_fix_shortcodes for every nested shortcode functions, like bs_container, bs_row, bs_column…

    If you need any more info, please contact me. I am glad to help on this issue.

    Cheers!

    • This topic was modified 7 years, 9 months ago by tqhung85.
  • The topic ‘Improvement suggestion’ is closed to new replies.