How can I disable automatic paragraph tags, but retain line breaks?
I have used this to remove wpautop:
remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' ); But there are no more line breaks in the text.
Here's the full solution.
First disable wpautop in your functions.php
remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' ); Then parse your content/excerpt with nl2br (a standard PHP function).
add_filter( 'the_content', 'nl2br' ); add_filter( 'the_excerpt', 'nl2br' );
<br />tags, I assume? (EOLs should be there)