Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Типы EI

// Register Custom Taxonomy
function ei_type_taxonomy() {

	$labels = array(
		'name'                       => _x( 'EI Types', 'Taxonomy General Name', 'text_domain' ),
		'singular_name'              => _x( 'EI Type', 'Taxonomy Singular Name', 'text_domain' ),
		'menu_name'                  => __( 'Тип EI', 'text_domain' ),
		'all_items'                  => __( 'Все Типы EI', 'text_domain' ),
		'parent_item'                => __( 'Родительский Тип EI', 'text_domain' ),
		'parent_item_colon'          => __( 'Родительский Тип EI:', 'text_domain' ),
		'new_item_name'              => __( 'Имя Нового Типа EI', 'text_domain' ),
		'add_new_item'               => __( 'Добавить Новый Тип EI', 'text_domain' ),
		'edit_item'                  => __( 'Редактировать Тип EI', 'text_domain' ),
		'update_item'                => __( 'Обновить Тип EI', 'text_domain' ),
		'separate_items_with_commas' => __( 'Разделите Типы Запятой', 'text_domain' ),
		'search_items'               => __( 'Поиск Типа EI', 'text_domain' ),
		'add_or_remove_items'        => __( 'Добавить или Удалить Типы EI', 'text_domain' ),
		'choose_from_most_used'      => __( 'Выбрать из Часто Используемых', 'text_domain' ),
		'not_found'                  => __( 'Не Найдено', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                       => 'ei_type',
		'with_front'                 => true,
		'hierarchical'               => false,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'query_var'                  => 'city',
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'ei_type_taxonomy', 'custom_post_type', $args );

}

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