Материалы 4-го вебинара

Выборочное отключение блочного редактора Гутенберг

add_filter( 'use_block_editor_for_post_type', 'disable_gutenberg', 10, 2 );
function disable_gutenberg( $use_block_editor, $post_type ){
	if ($post_type == 'post') { return true;} else { return false; }
}

Подробнее о хуке use_block_editor_for_post_type

Получение ID главной страницы

$front_page_id = get_option('page_on_front');

Создание нового типа записи

<?php
// Register Speaker Post Type
function register_custom_post_types() {

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

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

Подробнее о функции register_post_type()
Сервис Generate WP

Аддон ACF Front Editor

https://ru.wordpress.org/plugins/acf-front-end-editor/

Аддон ACF Columns

https://ru.wordpress.org/plugins/acf-columns/

Аддон ACF Code Field

https://wordpress.org/plugins/acf-code-field/