Skip to content

Instantly share code, notes, and snippets.

@kuldeepdaftary
Last active December 18, 2015 15:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kuldeepdaftary/5803971 to your computer and use it in GitHub Desktop.
Decide when you want to apply the auto paragraph Wordpress
<?php
add_filter('the_content','my_custom_formatting');
function my_custom_formatting($content){
if((get_post_type()=='trend-story') || (get_post_type()=='fashion-story') || (get_post_type()=='how-to-wear-it'))
return $content; //no autop
else
return wpautop($content);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment