Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Coolase project post type

// Register Custom Post Type
function project_post_type() {

	$labels = array(
		'name'                  => _x( 'Проекты', 'Post Type General Name', 'coolaste' ),
		'singular_name'         => _x( 'Проект', 'Post Type Singular Name', 'coolaste' ),
		'menu_name'             => __( 'Проекты', 'coolaste' ),
		'name_admin_bar'        => __( 'Проекты', 'coolaste' ),
		'archives'              => __( 'Архив', 'coolaste' ),
		'attributes'            => __( 'Атрибуты', 'coolaste' ),
		'parent_item_colon'     => __( 'Родительская категория:', 'coolaste' ),
		'all_items'             => __( 'Все проекты', 'coolaste' ),
		'add_new_item'          => __( 'Добавить новый проект', 'coolaste' ),
		'add_new'               => __( 'Добавить проект', 'coolaste' ),
		'new_item'              => __( 'Новый проект', 'coolaste' ),
		'edit_item'             => __( 'Редактировать проект', 'coolaste' ),
		'update_item'           => __( 'Обновить проект', 'coolaste' ),
		'view_item'             => __( 'Посмотреть проект', 'coolaste' ),
		'view_items'            => __( 'Посмотреть проекты', 'coolaste' ),
		'search_items'          => __( 'Найти проект', 'coolaste' ),
		'not_found'             => __( 'Не найдено', 'coolaste' ),
		'not_found_in_trash'    => __( 'Не найдено в корзине', 'coolaste' ),
		'featured_image'        => __( 'Изображение', 'coolaste' ),
		'set_featured_image'    => __( 'Установить изображение', 'coolaste' ),
		'remove_featured_image' => __( 'Удалить изображение', 'coolaste' ),
		'use_featured_image'    => __( 'Использовать изображение', 'coolaste' ),
		'insert_into_item'      => __( 'Вставить в проект', 'coolaste' ),
		'uploaded_to_this_item' => __( 'Загрузить в этот проект', 'coolaste' ),
		'items_list'            => __( 'Список проектов', 'coolaste' ),
		'items_list_navigation' => __( 'Навигация', 'coolaste' ),
		'filter_items_list'     => __( 'Фильтр', 'coolaste' ),
	);
	$args = array(
		'label'                 => __( 'Проект', 'coolaste' ),
		'description'           => __( 'Все проекты Coolaste08', 'coolaste' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor' ),
		'taxonomies'            => array( 'category' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-portfolio',
		'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'       => 'page',
	);
	register_post_type( 'project', $args );

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