WordPress Not Creating Line Breaks

This still works but the UPDATE below is better

The solution to WordPress not recognizing line breaks is to tweak your source code.  You will need a way to edit the HTML on your site.  Go to wp-includes -> post-template.php

Search for “function the_content“.

At the end of that function you will see:

[php] //
echo $content;
//
[/php]

Change that to:

[php] //
echo nl2br($content);
//
[/php]

That will convert your line breaks in the code into a line break in the HTML code.

UPDATE

Thanks to the WordPress forum, I have found another (possibly more proper) fix to this issue.

In your WordPress plugins, search for a new plug-in called “TinyMCE-Advanced”, or download it from here: http://wordpress.org/extend/plugins/tinymce-advanced/

Next, go to your TinyMCE-Advanced settings and select the checkbox that says “stop removing the <p> and <br> tags”.

Be the first to comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.