一旦您注册了自定义分类法,分类法管理页面将由WordPress处理。
add_action( \'init\', \'create_ticker_taxonomies\', 0 );
//create two taxonomies, genres and writers for the post type "book"
function create_ticker_taxonomies() {
// Add new taxonomy, make it non-hierarchical (like \'tags\')
$labels = array(
\'name\' => _x( \'Tickers\', \'taxonomy general name\' ),
...
);
register_taxonomy(\'ticker\',array(\'post\'), array(
\'hierarchical\' => false,
\'labels\' => $labels,
\'show_ui\' => true,
\'query_var\' => true,
));
}
有关分类法及其标签的完整选项,请参见
Codex Page.