Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Files category

// Register Custom Taxonomy
function files_category_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Категории файлов', 'Taxonomy General Name', 'dstheme' ),
		'singular_name'              => _x( 'Категория файлов', 'Taxonomy Singular Name', 'dstheme' ),
		'menu_name'                  => __( 'Категории файлов', 'dstheme' ),
		'all_items'                  => __( 'Все категории', 'dstheme' ),
		'parent_item'                => __( 'Родительская категория', 'dstheme' ),
		'parent_item_colon'          => __( 'Родительская категория', 'dstheme' ),
		'new_item_name'              => __( 'Название', 'dstheme' ),
		'add_new_item'               => __( 'Добавить новую', 'dstheme' ),
		'edit_item'                  => __( 'Изменить', 'dstheme' ),
		'update_item'                => __( 'Обновить', 'dstheme' ),
		'view_item'                  => __( 'Просмотреть', 'dstheme' ),
		'separate_items_with_commas' => __( 'Separate items with commas', 'dstheme' ),
		'add_or_remove_items'        => __( 'Добавить или удалить', 'dstheme' ),
		'choose_from_most_used'      => __( 'Выбрать из часто используемых', 'dstheme' ),
		'popular_items'              => __( 'Популярные', 'dstheme' ),
		'search_items'               => __( 'Найти категорию', 'dstheme' ),
		'not_found'                  => __( 'Не найдено', 'dstheme' ),
		'no_terms'                   => __( 'Нет категорий', 'dstheme' ),
		'items_list'                 => __( 'Список категорий', 'dstheme' ),
		'items_list_navigation'      => __( 'Items list navigation', 'dstheme' ),
	);
	$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( 'files_category', array( 'files' ), $args );

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