Created
March 29, 2015 20:40
-
-
Save webmasterninjay/217fbcffc0586b1a6dbe to your computer and use it in GitHub Desktop.
Wordpress: Remove auto p filter on custom post type
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
<?php | |
add_filter( 'the_content', 'jay_remove_autop', 0 ); | |
function jay_remove_autop( $content ) { | |
// change 'post-type' to the custom post type | |
'post-type' === get_post_type() && remove_filter( 'the_content', 'wpautop' ); | |
return $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment