Looking at the codex and the code they provide, it doesn't seem like I can add a second editor. This looks like something more for front-end use rather than for use in the admin.
If I am wrong, can someone help me figure this out?
Thanks.
Looking at the codex and the code they provide, it doesn't seem like I can add a second editor. This looks like something more for front-end use rather than for use in the admin.
If I am wrong, can someone help me figure this out?
Thanks.
Share Improve this question asked Jun 16, 2014 at 4:05 KapitolKapitol 691 gold badge2 silver badges8 bronze badges 2- Are you referring to post add/edit page on admin end? Please explain little bit more for exactly what you are trying to achieve. – Chittaranjan Commented Jun 16, 2014 at 7:05
- Inside a post page having a second content(); area other than the excerpt or custom fields(which seem to get ignored by clients, they always want formatting options in a large textarea box). – Kapitol Commented Jun 20, 2014 at 19:56
1 Answer
Reset to default 0You can always use wp_editor
on the admin end. One such situation may be by using metabox. In this case let's say you want to manage custom description about the post. So instead of a simple textarea, you can use wp_editor
.
Ex:
In the example given in the above add_meta_box
Codex url, you can replace
echo '<input type="text" id="myplugin_new_field" name="myplugin_new_field" value="' . esc_attr( $value ) . '" size="25" />';
by
echo wp_editor( esc_attr( $value ), 'myplugin_new_field' );
You can try out the above code by adding into active theme's functions.php
file. Once you do this, you should see an editor now.