Shortcode to output raw HTML
-
I’ve been using this great snippet from Jean-Baptiste Jung to output raw HTML with a shortcode. However I’ve realized that this sometimes interferes with the output of other plugins – wpautop and wptexturize are applied wrongly sometimes.
So I tried re-writing the snippet with the shortcode API. Here’s what I got so far:
function raw_html($atts, $content = null) { remove_filter('the_content', 'wpautop'); remove_filter('the_content', 'wptexturize'); return $content; } add_shortcode('raw', 'raw_html');
Unfortunately it doesn’t work. Any help would be appreciated. Thanks!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Shortcode to output raw HTML’ is closed to new replies.