WordPress.org

Ready to get started?Download WordPress

Forums

Shortcode bug with enclosing html (4 posts)

  1. yahrou
    Member
    Posted 3 years ago #

    Hi all,

    I'm working on a website using lots of short codes. The shortcodes use enclosng content and become very buggy when used with WYSIWYG wordpress editor and especially with html content.

    [the_box width="100%" type="landing"]
    <h2>Test content</h2>
    TEst test
    
    [/the_box]
    Test

    The above code for example is giving me no content at all. And sometimes, but I find it difficult to reproduce, the outside content "Test" is being put within the box.

    Is this a known issue ? Is there some workaround ? This is making me crazy !

    Thank's

  2. Stefan
    Member
    Posted 3 years ago #

    Hi yahrou,

    have you found a solution? I'm currently having some issues with that, too.
    Especially switching between WYSIWYG and HTML-Mode in the Editor destroys the content-part of the shortcode.

  3. yahrou
    Member
    Posted 3 years ago #

    Hi,

    I had to edit the shortcode itself (I mean, create a new shortcode on my own) and use div to enclose the content instead of span. It solved the problem...

  4. Stefan
    Member
    Posted 3 years ago #

    Thanks for your quick answer.

Topic Closed

This topic has been closed to new replies.

About this Topic