An Easy Solution to a Common Problem
I run into this problem with almost every installation of WordPress I do. I want to limit the HTML in a post because I don’t assume my authors know HTML. However, my pages are usually much more static and need better written HTML to be styled well. So how do I keep the auto adding of ‘p’ tags in posts but strip them on pages?
It’s a lot easier than you think. Some people have gone with the super small plugin – “Disable WPAUTOP” but the problem with that plugin is that is strips the ‘p’ tags on all posts and pages.
To solve this problem all you have to do is add the below line of code into your Page Template (page.php). From this point on WordPress will not add in all those unnecessary ‘p’ tags on your pages.
<?php
remove_filter ('the_content','wpautop');
?>
This is a simple fix to a problem that seems to cause a lot of havoc on WordPress blogs.




