Created
March 29, 2014 05:57
-
-
Save DarrylErentzen/9849343 to your computer and use it in GitHub Desktop.
Disable wpautop for specific post type (works even if post type is embedded in another post or page)
This file contains 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
function disable_wpautop() { | |
if (get_post_type() == 'frm_display') // replace with slug of your desired post type | |
remove_filter('the_content', 'wpautop'); | |
} | |
add_action('wp_head', 'disable_wpautop'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment