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' );