function add_custom_taxonomies() {
register_taxonomy('category-cars', 'page', array(
'hierarchical' => true,
// This array of options controls the labels displayed in the WordPress Admin UI
'labels' => array(
'name' => _x( 'Категории автомобили', 'taxonomy general name' ),
'singular_name' => _x( 'Категория авто', 'taxonomy singular name' ),
'search_items' => ( 'Найти категорию авто' ),
'all_items' => ( 'Все' ),
'parent_item' => ( 'Parent Location' ),
'parent_item_colon' => ( 'Parent Location:' ),
'edit_item' => ( 'Изменить' ),
'update_item' => ( 'Update Location' ),
'add_new_item' => ( 'Обновить' ),
'new_item_name' => ( 'Добавить новую категорию для авто' ),
'menu_name' => __( 'Категории Авто' ),
),
'rewrite' => array(
'slug' => 'category-cars',
'with_front' => false, // Don't display the category base before "/locations/"
'hierarchical' => true // This will allow URL's like "/locations/boston/cambridge/"
),
));
}
add_action( 'init', 'add_custom_taxonomies', 0 );