Created
December 4, 2014 12:02
-
-
Save timersys/a5a8d733ddb96e229954 to your computer and use it in GitHub Desktop.
Display a shortcode code without parsing it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * If you need to show a shortcode code and double | |
| * brackets ar enot working for you [[]] | |
| * you can always try this | |
| */ | |
| add_shortcode('raw','raw_fc'); | |
| function raw_fc($atts, $content){ | |
| remove_filter( 'the_content', 'do_shortcode', 11 ); | |
| return '<code>'.$content.'</code>'; | |
| add_filter( 'the_content', 'do_shortcode', 11 ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment