Gtlfujub
// Register Custom Post Type
function educators_post_type() {
$labels = array(
'name' => _x( 'Педагоги', 'Post Type General Name', 'dstheme' ),
'singular_name' => _x( 'Педагог', 'Post Type Singular Name', 'dstheme' ),
'menu_name' => __( 'Педагоги', 'dstheme' ),
'name_admin_bar' => __( 'Педагоги', 'dstheme' ),
'archives' => __( 'Педагоги', 'dstheme' ),
'attributes' => __( 'Item Attributes', 'dstheme' ),
'parent_item_colon' => __( 'Parent Item:', 'dstheme' ),
'all_items' => __( 'Все педагоги', 'dstheme' ),
'add_new_item' => __( 'Добавить педагога', 'dstheme' ),
'add_new' => __( 'Добавить нового', 'dstheme' ),
'new_item' => __( 'Новая запись', 'dstheme' ),
'edit_item' => __( 'Редактировать', 'dstheme' ),
'update_item' => __( 'Обновить', 'dstheme' ),
'view_item' => __( 'Просмотр педагога', 'dstheme' ),
'view_items' => __( 'Просмотр педагогов', 'dstheme' ),
'search_items' => __( 'Поиск педагога', 'dstheme' ),
'not_found' => __( 'Не найдено', 'dstheme' ),
'not_found_in_trash' => __( 'В корзине не найдено', 'dstheme' ),
'featured_image' => __( 'Фотография педагога', 'dstheme' ),
'set_featured_image' => __( 'Добавить фото', 'dstheme' ),
'remove_featured_image' => __( 'Удалить фото', 'dstheme' ),
'use_featured_image' => __( 'Использовать фото', 'dstheme' ),
'insert_into_item' => __( 'Вставить в элемент', 'dstheme' ),
'uploaded_to_this_item' => __( 'Uploaded to this item', 'dstheme' ),
'items_list' => __( 'Items list', 'dstheme' ),
'items_list_navigation' => __( 'Items list navigation', 'dstheme' ),
'filter_items_list' => __( 'Filter items list', 'dstheme' ),
);
$args = array(
'label' => __( 'Педагог', 'dstheme' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'thumbnail' ),
'taxonomies' => array( 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-admin-users',
'show_in_admin_bar' => false,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => true,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'educators', $args );
}
add_action( 'init', 'educators_post_type', 0 );