不幸的是,WP是hardcoded to generate taxonomy metaboxes in that side
location.
它非常脆弱,但可以将生成的数据从一个位置扔到另一个位置:
add_action( \'add_meta_boxes\', \'move_taxonomy_metabox\' );
function move_taxonomy_metabox() {
global $wp_meta_boxes;
$taxonomy = \'test\';
$metabox_key = \'tagsdiv-\' . $taxonomy; // or $taxonomy . \'div\' if hierarhical
if ( isset( $wp_meta_boxes[\'post\'][\'side\'][\'core\'][$metabox_key] ) ) {
$metabox = $wp_meta_boxes[\'post\'][\'side\'][\'core\'][$metabox_key];
unset( $wp_meta_boxes[\'post\'][\'side\'][\'core\'][$metabox_key] );
$wp_meta_boxes[\'post\'][\'normal\'][\'core\'][$metabox_key] = $metabox;
}
}
更合适的方法可能是只使用nuke生成的metabox并完全重做注册。