Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

portfolio

// Register Custom Post Type
function custom_post_type_portfolio() {

	$labels = array(
		'name'                  => 'Портфолио',
		'singular_name'         => 'Портфолио',
		'menu_name'             => 'Работы',
		'name_admin_bar'        => 'Наши работы',
		'archives'              => 'Архив работ',
		'attributes'            => '',
		'parent_item_colon'     => '',
		'all_items'             => 'Все работы',
		'add_new_item'          => 'Добавление работы',
		'add_new'               => 'Добавить работу',
		'new_item'              => 'Новая работа',
		'edit_item'             => 'Редактировать работу',
		'update_item'           => 'Обновить работу',
		'view_item'             => 'Смотреть работу',
		'view_items'            => 'Смотреть работы',
		'search_items'          => 'Искать работу',
		'not_found'             => 'Работа не найдена',
		'not_found_in_trash'    => 'Работа не найдена в корзине',
		'featured_image'        => '',
		'set_featured_image'    => '',
		'remove_featured_image' => '',
		'use_featured_image'    => '',
		'insert_into_item'      => '',
		'uploaded_to_this_item' => '',
		'items_list'            => '',
		'items_list_navigation' => '',
		'filter_items_list'     => '',
	);
	$rewrite = array(
		'slug'                  => 'portfolio',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => 'Портфолио',
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail' ),
		'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'           => 'archive_portfolio',
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'query_var'             => 'portfolio',
		'rewrite'               => $rewrite,
		'capability_type'       => 'page',
	);
	register_post_type( 'portfolio', $args );

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