Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Галерея

// Register Custom Post Type
function gallery_post_type() {

	$labels = array(
		'name'                => 'Изображения',
		'singular_name'       => 'Галерея',
		'menu_name'           => 'Галерея',
		'name_admin_bar'      => 'Галерея',
		'parent_item_colon'   => 'Родительский',
		'all_items'           => 'Все',
		'add_new_item'        => 'Добавить',
		'add_new'             => 'Добавить новый',
		'new_item'            => 'Новый',
		'edit_item'           => 'Редактировать',
		'update_item'         => 'Обновить',
		'view_item'           => 'Просмотр',
		'search_items'        => 'Поиск',
		'not_found'           => 'Ничего не найдено',
		'not_found_in_trash'  => 'Ничего не найдено в корзине',
	);
	$args = array(
		'label'               => 'Галерея',
		'labels'              => $labels,
		'supports'            => array( ),
		'taxonomies'          => array( 'gallery_cat' ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'menu_position'       => 5,
		'show_in_admin_bar'   => true,
		'show_in_nav_menus'   => true,
		'can_export'          => true,
		'has_archive'         => true,		
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'capability_type'     => 'post',
	);
	register_post_type( 'gallery_post_type', $args );

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