Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

product-cats

// Register Custom Taxonomy
function pillow_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Категории товаров', 'Taxonomy General Name', 'theme' ),
		'singular_name'              => _x( 'Категория товаров', 'Taxonomy Singular Name', 'theme' ),
		'menu_name'                  => __( 'Категория товаров', 'theme' ),
		'all_items'                  => __( 'Все категории', 'theme' ),
		'parent_item'                => __( 'Родительская категория', 'theme' ),
		'parent_item_colon'          => __( 'Родительская категория:', 'theme' ),
		'new_item_name'              => __( 'Новая категория', 'theme' ),
		'add_new_item'               => __( 'Добавить новую категорию', 'theme' ),
		'edit_item'                  => __( 'Редактировать категорию', 'theme' ),
		'update_item'                => __( 'Сохранить категорию', 'theme' ),
		'view_item'                  => __( 'Просмотреть категорию', 'theme' ),
		'separate_items_with_commas' => __( 'Категории через запятую', 'theme' ),
		'add_or_remove_items'        => __( 'Добавить/удалить категорию', 'theme' ),
		'choose_from_most_used'      => __( 'Наиболее используемые категории', 'theme' ),
		'popular_items'              => __( 'Популярные категории', 'theme' ),
		'search_items'               => __( 'Найти категории', 'theme' ),
		'not_found'                  => __( 'Категории не найдены', 'theme' ),
		'no_terms'                   => __( 'Нет категорий', 'theme' ),
		'items_list'                 => __( 'Список категорий', 'theme' ),
		'items_list_navigation'      => __( 'Навигация по списку категорий', 'theme' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
	);
	register_taxonomy( 'pillow_category', array( 'pillow' ), $args );

}
add_action( 'init', 'pillow_taxonomy', 0 );