Home

Wiping out WP break tags

For me, the strength of WordPress is the ability to add whatever HTML code I desire to my posts. However, the fact that WP automatically adds BR tags to your posts was driving me nuts. Luckily, that’s easy to change. If you’re in WP 1.5 like me, the file you need to change is the aptly-named /wp-includes/functions-formatting.php.

Change:
Line 56: function wpautop($pee, $br = 1) {
to
Line 56: function wpautop($pee, $br = 0) {

Welcome to the world of controlling your own line breaks and don’t forget the trailing slashes ;-)

Related Posts

Comments are closed.