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' ) ) ) ); 
  • They should not be spread with ACF lotion, but with taxonomy. Then the admin will be all right. - KAGG Design
  • @KAGG Design i.e., introduce a new taxonomy? explain. There is already such a primoka and moreover, a calendar with options has been set up for this case and it has been written out with 20k sessions. The question now is how to spread - Vasya
  • one
    Well, yes, you need a taxonomy for the type of classes and a filter of taxonomies in the admin panel : generatewp.com/filtering-posts-by-taxonomies-in-the-dashboard - KAGG Design
  • @KAGG Design Thank you, I will try, I will write about it at the end - Vasya

0