ThemeForest

Disabling shortcodes inside <code> or <pre>

1025 posts
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 500 and 999 users
  • Sold between 250 000 and 1 000 000 dollars
+1 more
ThemeBlvd says

How I do it on my live demos is just by writing them with span tags. The span tags will make it so WP doesn’t see them as shortcodes, but and then obviously span tags are html tags and won’t show on the front end of your site.

So this:

[<span>example_shortcode</span>]

Will output this on your WP post:

[example_shortcode]

461 posts
  • Author had a File in an Envato Bundle
  • Sold between 250 000 and 1 000 000 dollars
  • Elite Author
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has been a member for 3-4 years
  • India
+1 more
SaurabhSharma says

How I do it on my live demos is just by writing them like this with span tags. The span tags will make it so WP doesn’t see them as shortcodes, but they also obviously won’t show.

So this:

[<span>example_shortcode</span>]

Will output this on your WP post:

[example_shortcode]

That’s tricky. +1 :)

98 posts I think about colours
  • Bought between 50 and 99 items
  • Elite Author
  • Exclusive Author
  • Greece
  • Has been a member for 3-4 years
  • Referred between 50 and 99 users
  • Sold between 100 000 and 250 000 dollars
ginaalessia says

Use two brackets instead of one:

[ [ shortcode ] ]

It only displays [shortcode]

660 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Referred between 500 and 999 users
  • Envato Staff
  • Author had a File in an Envato Bundle
  • Has been a member for 4-5 years
  • Support Staff
+6 more
cudazi support says

I wish I would have asked this a while back, great responses! :)

by
by
by
by
by