Disable wpautop, keep line breaks

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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)