Skip to content

How To Remove Automatic Paragraph Tags In WordPress

The most annoying thing about WordPress is its automatic post formatting. WordPress automatically adds paragraph tags and other necessary tags to your posts. It’s a useful feature, but if you love to play with HTML codes then it’s definitely not for you.

So, is there any way to prevent WordPress from doing that? Yea, there’s a one line solution to this problem. Just add following snippet to your current theme’s functions.php file:

// Remove automatic paragraphs
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );

3 thoughts on “How To Remove Automatic Paragraph Tags In WordPress”

  1. This definitely works, but makes it harder when creating blog posts where the paragraph tags are needed for formatting. Do you know of a solution where you can turn off the auto-p feature by default, but re-enable it for posts? Thanks for the help!

Leave a Reply

Your email address will not be published. Required fields are marked *