Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

dkit-staff

// Register Custom Post Type
function register_dkit_post_types() {

	$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'                  => 'staff',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => 'Сотрудник',
		'description'           => 'Штат сотрудников',
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-id-alt',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => false,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'rewrite'               => $rewrite,
		'capability_type'       => 'post',
		'show_in_rest'          => true,
	);
	register_post_type( 'staff-dkit', $args );

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