我在分类法元框中得到空的分类列表。我在我的分类法下创建了几个术语,但我甚至找不到。
自定义帖子类型的代码
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => true,
'show_in_menu' => false,
'hierarchical' => false,
'menu_position' => NULL,
'supports' => array('title', 'editor', 'thumbnail', 'author', 'comments', $this->taxonomy /* 'teams' */),
'taxonomies' => array($this->taxonomy /* 'teams' */)
);
register_post_type( $this->postType /* 'videos' */, $args);
我的分类
register_taxonomy($this->taxonomy /* 'teams' */, $this->postType /* 'videos' */,array(
'hierarchical' => false,
'labels' => $labels,
'show_ui' => true,
'show_in_menu' => false,
'show_admin_column' => true,
'update_count_callback' => '_update_post_term_count',
'query_var' => true,
);