[resolved] Escaping shortcode (5 posts)

  1. splotch
    Posted 8 years ago #

    How do you escape shortcode in the post content? I've searched all over the site and can't seem to find it documented.

    I'm trying to document a plugin and I need to be able to show the shortcode in the post as it should be written, not have it replaced by my plugin.

    I know it's a simple solution, I just can't find what it is.

    Thanks for your help.

  2. splotch
    Posted 8 years ago #

    Apparently not too many people know how to escape shortcodes in a post. If anyone does know, please post it. I'm sure I'm not the only person looking for this.

  3. splotch
    Posted 8 years ago #

    I think I've finally dug up the solution. Instead of using the "[" and "]" characters, replace them with their respective html entity counterparts.

    [ => [
    ] => ]

    Hope that helps anyone else out there banging their head on the same problem.

  4. splotch
    Posted 8 years ago #

    Be careful switching between the Visual and HTML editors, as this will revert the [ to [ and cause your shortcode to be parsed.

  5. Nice info Splotch! Thanks for sharing.

Topic Closed

This topic has been closed to new replies.

About this Topic