P tag is not displayed in html editor (TinyMCE) for WordPress P tag is not displayed in html editor (TinyMCE) for WordPress wordpress wordpress

P tag is not displayed in html editor (TinyMCE) for WordPress


It's not difficult to do this. To display the p and br tag we just need to install plugin which is "tinymce-advanced" and do some setting change. To change the setting just click check box for "Stop removing the p and br tags when saving and show them in HTML editor" and save. Now we can see the p and br tags in HTML mode.

:)


When you retrieve the stored data from the database, you need to run a filter on it to add the p and br tags back in. This is how wordpress handles content. When you use the_content(), for example, it is already running a filter on it, so when you have a custom loop, you may need to run the filter manually.

<?php echo apply_filters('the_content', $your_retrieved_data); ?>

reference: http://codex.wordpress.org/Function_Reference/apply_filters

You definitely don't need a plugin, and I would recommend not using the method described by user75472. Your data won't be as clean and future-proof.


Try adding the following line just before the_content() tag in your template:

<?php remove_filter ('the_content', 'wpautop'); ?>

Source