• Resolved geekwithsoul

    (@geekwithsoul)


    Great plugin! However, running into an issue where when using the shortcodes in a page body, the output is filled with empty paragraph tags and linebreaks, so:

    [otw_shortcode_info_box border_type="bordered" border_style="bordered" shadow="shadow-down-right" rounded_corners="rounded-10" border_color="#838c99"]
    <h3>Example</h3>
    Text
    [/otw_shortcode_info_box]

    is producing the following:

    <div class="otw-sc-box bordered bordered shadow-down-right rounded-10" style="border-color: #838c99;"><div><p></p><br>
    <h3>Example</h3><br>
    <p>Text</p><br>
    <p></p></div></div>

    Any suggestions?

    https://wordpress.org/plugins/info-boxes-shortcode-and-widget/

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

    (@otwthemes)

    Hey,

    This should is the page editor messing with the formatting… Try going into Text mode and write your html there. Avoid using spaces and newlines.

    Paste that in Text mode and it looks a lot better:

    [otw_shortcode_info_box border_type=”bordered” border_style=”bordered” shadow=”shadow-down-right” rounded_corners=”rounded-10″ border_color=”#838c99″]<h3>Example</h3>Text[/otw_shortcode_info_box]

    Thread Starter geekwithsoul

    (@geekwithsoul)

    Thanks for the reply! I tried that, but the editor adds back in all the spaces and newlines upon save and then the tags are still all produced.

    Managed a workaround with the following in the css though:

    .otw-sc-box br {display: none;}
    .otw-sc-box p:empty {display: none;}

    Not perfect, but at least it seems to work for now. And obviously with any real code, the problem is worse as a br tag or (even worse) a open/close set of br tags gets added after elements.

    And just to clarify, this isn’t happening with any of the rest of my content or any other shortcodes I’m using – just the ones for this particular plugin.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Shortcodes get HTML formatting’ is closed to new replies.