• shortcodes wrapped by <p> automatically.
    It breaks some shortcode output like columns.
    Would you change behavior not to add <p>.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Andrew Ozz

    (@azaozz)

    This is the behavior in WordPress, and is the expected one. In the editor shortcodes are “just text” that acts as a placeholder.

    If you want to add a single shortcode on its own line, you will have to take care of the paragraph that is added with it. Generally you may want to add a shortcode as part of the element(s) you need, not separately. I.e. if you are adding [shcode]<div>...</div>, you are better off with <div>[shcode]...</div>.

    Thread Starter ashf

    (@ashf)

    I often use something like this

    [columns]
    aaa
    bbb
    ccc
    [/columns][columns]
    111
    222
    333
    [/columns]

    Is there best way to handle this?

    Thread Starter ashf

    (@ashf)

    This is a solution I found.
    add_filter('content_save_pre','shortcode_unautop',10,1);

    But it would be nice if TinyMCE Advanced had ability to prevent shortcode being added p tag.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘shortcodes wrapped by’ is closed to new replies.