There is a registered custom entry type lesson on wordpress .
On the site I use 2 types of occupations single ($ single_lesson) and repeating ($ repeater_lesson), which differ in the selectedon advanced custom fields key lesson_single .
Code function.php
//регистрация типа записи add_action( 'init', 'register_my_cpt' ); function register_my_cpt() { register_post_type('lesson', array( 'public' => true, 'has_archive' => true, 'menu_icon' => 'dashicons-welcome-write-blog', 'label' => 'Занятия', 'rewrite' => array( 'slug' => 'lesson', 'with_front' => false ), 'supports' => array( 'title', 'editor', 'thumbnail' ) )); } In the admin, both single and repeated events are displayed in the stream all together by a common list, which is not convenient to monitor and edit. Is it possible to separate them into different items of the admin menu so that they do not overlap with each other or is this possible only by registering a new type of entries? If so, how?
//вывод $single_lesson = new WP_Query( array ( 'post_type' => 'lesson', 'posts_per_page' => '-1', 'order' => 'ASC', 'post_status' => array( 'future' ), 'meta_query' => array( array( 'key' => 'lesson_single', 'value' => '1' ) ) ) ); $repeater_lesson = new WP_Query( array ( 'post_type' => 'lesson', 'posts_per_page' => '-1', 'order' => 'ASC', 'post_status' => array( 'publish', 'future' ), 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'lesson_single', 'compare' => 'NOT EXISTS', ), array( 'key' => 'lesson_single', 'value' => '1', 'compare' => '!=', 'type' => 'NUMERIC' ) ) ) );