Support » Plugins » Escaping shortcode

  • Resolved splotch


    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    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.

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

    John Blackbourn


    WordPress Core Developer

    Nice info Splotch! Thanks for sharing.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Escaping shortcode’ is closed to new replies.