wordpress - <p></p> missing with wp_editor( get_option() ); -


i trying add options theme , added wysiwyg textarea , value of textarea go option table (wp-options).

so here code used:

$settings = array(   'textarea_name' => 'options[content]',   'quicktags' => true,   'tinymce'=> true, ); wp_editor( get_option('content','default_value'), 'content', $settings ); 

this work pretty fine apparently remove <p> tags content , have absolutely no idea why..

for example when wrote this:

level 1 title   level 2 title     paragraph     paragraph 

this code sent db called 'content':

<h1>level 1 title</h1>   <h2>level 2 title</h2>     paragraph paragraph 

instead of this:

<h1>level 1 title</h1>   <h2>level 2 title</h2>     <p>a paragraph</p>     <p>another paragraph</p> 

do have idea can unchanged value tags?

ps: when add <p> tags manually text side, works until go visual side , re-save.

thanks helping

use wpautop function on content add <p> tags around paragraphs.

wp_editor( wpautop(get_option('content','default_value')), 'content', $settings ); 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -