添加自定义分类法时,可以声明重写段塞-
$labels = array(
\'name\' => _x(\'Name\', \'taxonomy general name\'),
\'singular_name\' => _x(\'Singular Name\', \'taxonomy singular name\'),
\'search_items\' => __(\'Search Items\'),
\'all_items\' => __(\'All Names\'),
\'parent_item\' => __(\'Parent Item\'),
\'parent_item_colon\' => __( \'Parent Ites:\'),
\'edit_item\' => __(\'Edit Item\'),
\'update_item\' => __(\'Update Item\'),
\'add_new_item\' => __(\'Add New Item\'),
\'new_item_name\' => __(\'New Item Name\'),
);
register_taxonomy(
\'ad_category\',
array(\'post-type1\', \'post-type2\'),
array(
\'hierarchical\' => true,
\'labels\' => $labels,
\'show_ui\' => true,
\'query_var\' => true,
\'rewrite\' => array(\'slug\' =>\'new-york-city\')
)
);