Escaping shortcodes in WordPress Posts

If you want to display the shortcode literally in a post (like so: [shortcode]), just use double brackets like this: “[[shortcode]]”. You can also use the html entities [ for “[" and ] for "]” (which you’ll need to use if your shortcode doesn’t exist and therefore doesn’t run through the parser).

This entry was posted in Code Snippets. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>