Reputation: 1743
This is how I add custom taxonomy
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'supports' => array( 'editor', 'thumbnail')
);
register_taxonomy( 'bookwriters', 'product', $args );
I want add WordPress editor on description how i can do that ?
Upvotes: 2
Views: 61
Reputation: 15949
you can try something like this :
/**
* TinyMCE editor in taxonomy page
*/
function o99__category_editor() {
global $pagenow, $current_screen;
if( $pagenow == 'edit-tags.php' ) {
require_once(ABSPATH . 'wp-admin/includes/post.php'); // we need these
require_once(ABSPATH . 'wp-admin/includes/template.php');
wp_tiny_mce( false, array( 'editor_selector' => 'description', 'elements' => 'description', 'mode' => 'exact' )); // first argument TRUE will give the light version
}
}
add_action( 'init', 'o99__category_editor' );
I did not really tested it, but something along these lines should work. Also since the TinyMCE editor was dropped as default, , you might need to get the Classic Editor plugin. Also not tested.
Upvotes: 1