KeizerBridge
KeizerBridge

Reputation: 2757

Line break not woking with Wordpress TinyMCE Advanced

I have a word document, with all my posts already write on it. So I just have to copy/paste all these posts on my tinyMCE advanced Editor in my Wordpress 4.1

The only problem is that it doesn't take care about line break when I echo them in my blog page.. Whereas I can see these line break on tinyMCE visual preview. And if I check in the tinyMCE text mode, I don't see any <br /> or any <p> tags.

Does anyone had this problem ?

I have created my own template. And it is my first time on Wordpress so I could have miss something, but everyone seems to have a problem with remove_filter ('the_content', 'wpautop'); in their function.php But I don't have this function and I try with add_filter ('the_content', 'wpautop'); but it doesn't change anything.

Thank you in advance!

Upvotes: 2

Views: 468

Answers (1)

Rich
Rich

Reputation: 926

In your themes template where you output the_content try this:

$getPost = get_the_content();
$postformatted = wpautop( $getPost );
echo $postformatted;

You may want to remove the filter you added if it does not initially work.

Upvotes: 3

Related Questions