Skip to content

Instantly share code, notes, and snippets.

@DarrylErentzen
Created March 29, 2014 05:57
Show Gist options
  • Save DarrylErentzen/9849343 to your computer and use it in GitHub Desktop.
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)
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