你的注册有点错误。您没有提供正确标记分类法所需的任何字符串。将数组传递给“labels”,如下所示:
register_taxonomy(
\'location\',
array( \'post\' ),
array(
\'hierarchical\' => true,
\'labels\' => array(
\'name\' => _x( \'Genres\', \'taxonomy general name\' ),
\'singular_name\' => _x( \'Genre\', \'taxonomy singular name\' ),
\'search_items\' => __( \'Search Genres\' ),
\'all_items\' => __( \'All Genres\' ),
\'parent_item\' => __( \'Parent Genre\' ),
\'parent_item_colon\' => __( \'Parent Genre:\' ),
\'edit_item\' => __( \'Edit Genre\' ),
\'update_item\' => __( \'Update Genre\' ),
\'add_new_item\' => __( \'Add New Genre\' ),
\'new_item_name\' => __( \'New Genre Name\' ),
\'menu_name\' => __( \'Genre\' ),
),
\'rewrite\' => true
)
);
I copied that from the Codex 因此,对于“a”;流派“;分类法,而不是你的;“位置”;一个,但你应该看看需要发生什么。
此外,请注意按键。没有singular_label
我可以在抄本上看到。是的singular_name
.