2020-04-03 / 5726阅
public function add_tax_init() { register_taxonomy( $this->tax, $this->type, array( 'labels' => array( 'name' => $this->tax_name, 'add_new' => '新增', 'add_new_item' => '添加', 'new_item_name' => "新" . $this->tax_name, ), 'show_ui' => true, 'show_tagcloud' => true, 'hierarchical' => true, 'show_in_rest' => true ) ); } add_action('init', array($this, 'add_tax_init'));
function add_tax_init() { register_taxonomy( '分类法名称', '文章类型', array( 'labels' => array( 'name' => '新分类法', 'add_new' => '新增', 'add_new_item' => '添加', 'new_item_name' => "新分类法", ), 'show_ui' => true, 'show_tagcloud' => true, 'hierarchical' => true, 'show_in_rest' => true ) ); } add_action('init','add_tax_init');
阅读文章或者观看视频过程中有任何问题,请下方留言或者联系我Q248758228