splotch
Member
Posted 4 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.
splotch
Member
Posted 4 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.
splotch
Member
Posted 4 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.
splotch
Member
Posted 4 years ago #
Be careful switching between the Visual and HTML editors, as this will revert the [ to [ and cause your shortcode to be parsed.
John Blackbourn (johnbillion)
Member
Posted 3 years ago #
Nice info Splotch! Thanks for sharing.