Maybe not how you were expecting to solve this problem, was it? Maybe you thought about it and here I have one for you. I just wrote an article about integrating Google +1 and noticed that anywhere the shortcode [p1] is placed is executed. Not what we want when we are showing someone how to use them.
This is the escape shortcode:
[esc][p1][/esc]
This is how the shortcode appears after it has been escaped.
[p1]
The Escape Shortcode
There will be a time when you want to write about a cool shortcode you created like I just did and you will need your shortcodes to be un-executed.
// HTML Special Chars shortcode
function escapeHTML( $atts, $content=null ){
/* Author: Nicholas P. Iler
* URL: http://www.ilertech.com/2011/06/escape-wordpress-shortcodes-in-content-with-a-shortcode/
*/
$plus1_code = htmlentities($content);
return $plus1_code;
}
add_shortcode('esc', 'escapeHTML');
Conclusion
Now, you can escape anything you like. Not just shortcodes. I found a resource that suggest that merely entering double-brackets escapes them like this “[[ ]]” but I have not found this to work for me so I just threw this one together already knowing about the core PHP function htmlentities.


hey there and thank you for your information
– I have certainly picked up anything new from right here.
I did however expertise some technical points using this
website, as I experienced to reload the site many times previous to I could get
it to load properly. I had been wondering if your
web hosting is OK? Not that I’m complaining, but sluggish loading instances times will sometimes affect your placement in google and can damage your high-quality score if ads and marketing with Adwords. Well I’m adding this RSS to my email and could look out for a lot more of your respective interesting content.
Ensure that you update this again very soon.
My web blog; Preston
I don’t think double brackets is working anymore. This does so thanks!