Last active
December 17, 2015 18:59
-
-
Save rupert-ong/5657341 to your computer and use it in GitHub Desktop.
Wordpress: Remove Unwanted BR and P Tags around Shortcodes
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
| // Place in functions.php | |
| remove_filter( 'the_content', 'wpautop' ); | |
| add_filter( 'the_content', 'wpautop' , 12); | |
| // Place in your shortcode (in functions.php) | |
| $content = wpautop(trim($content)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment