Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

event cat taxonomy

// Register Custom Taxonomy
function event_cat_taxonomy() {

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

}

// Hook into the 'init' action
add_action( 'init', 'event_cat_taxonomy', 0 );