Reputation: 153
I want to set up a custom field in the admin section of WordPress so that a client can go in and edit the content of the custom field without having to hard-code things with HTML.
I've looked at this post, but I'm not sure if this is really applicable to my case.
Does anyone know a quick/easy way to do this?
For further clarifcation, I bring in custom fields to my page like this:
<div id="greybackground"> <div id="greycontainer">
<?php echo get_post_meta($post->ID, 'greycallout',true) ?></div></div>
Upvotes: 2
Views: 9041
Reputation: 5183
$settings = array( 'media_buttons' => false,'quicktags' => false );
$content = 'Optional Message For Your Friend here... ';
$editor_id = 'postcueeditor';
wp_editor( $content, $editor_id,$settings );
paste this code where you want editor to appear. $_REQUEST['postcueeditor'];
will contain data posted by the editor.
Upvotes: 8
Reputation: 1899
fyi check this addon which will allow you to add taxonomies to custom fields. the addon will allow you to save custom field taxonomy back to post terms. since addon doesnt currently support adding new terms, i used selectize.js (similar to chosen and select2, but without the code bloat). selectize.js has autocomplete and the ability to add new options on the fly. now you can manage taxonomies from advanced custom fields.
Good Luck
Upvotes: 1
Reputation: 6305
I use the Custom Content Type Manager plugin on nearly all my WordPress projects (http://wordpress.org/plugins/custom-content-type-manager/) and it allows you to create custom fields with a WYSIWYG editor.
Upvotes: 0