Support » Plugin: FP Foundation Assistant » Grid shortcode adding unnecessary tags

  • Resolved James Maiden

    (@reallygreenjames)


    Hi there,

    I’m using Foundation 6 from a Foundation based theme.

    I inserted grid shortcode like this:

    [fp-rows]
    [fp-columns small='' medium='4' large='4']Column One[/fp-columns]
    [fp-columns small='' medium='4' large='4']Column Two[/fp-columns]
    [fp-columns small='' medium='4' large='4']Column Three[/fp-columns]
    [/fp-rows]

    This output:

    <div class="row"><br>
    <div class="medium-4 large-4 columns">Column One</div><br>
    <div class="medium-4 large-4 columns">Column Two</div><br>
    <div class="medium-4 large-4 columns">Column Three</div><br>
    </div>

    Those <br> tags aren’t necessary and cause the columns structure to break.

    Though this is the first time I’ve used your plugin looks, which BTW looks incredibly well thought out and documented, I guess they’re appearing on my site randomly??

    I have tested this with all but your plugin deactivated.

    Can you shed any light on how/why those extra tags are getting inserted?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author fortpandemonium

    (@fortpandemonium)

    Hi,

    I am glad you like the plugin and thank you for the positive feedback. I’ve fixed the issue in the next version of the plugin that will be released probably some time next week.

    The problem is that the WordPress editor adds automatically the <br> tag. Can you please try adding in the theme functions file (in a child theme), the following code:

    
    function pndm_clean_shortcodes( $content ) { 
    
        $array = array (
            '<p>[' => '[', 
            ']</p>' => ']', 
            ']<br />' => ']'
        );
    
        $content = strtr( $content, $array );
    
        return $content;
    }
    add_filter('the_content', 'pndm_clean_shortcodes');
    

    This should remove the auto added <p> and <br> tags from the shortcodes.

    Another solution that I have found, but haven’t tried, is described in this discussion.

    Please, tell me if this works for you. The next release will fix the issue.

    Fort Pandemonium

    James Maiden

    (@reallygreenjames)

    That fixes it. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Grid shortcode adding unnecessary tags’ is closed to new replies.