我假设这是针对帖子的内置类别分类法?这就是这样做的方式。
add_action( \'registered_taxonomy\', \'my_custom_category_paragraph\', 10, 3 );
function my_custom_category_paragraph( $taxonomy, $object_type, $args ) {
global $wp_taxonomies;
if ( \'category\' !== $taxonomy )
return;
// Change the callback that renders the metabox with our own.
$wp_taxonomies[$taxonomy]->meta_box_cb = \'my_category_metabox_paragraph\';
}
function my_category_metabox_paragraph( $post, $box ) {
// add our paragraph here
echo \'<p>Hi there, sailor!</p>\';
// Call the default meta box function
post_categories_meta_box( $post, $box );
}