Is it possible on wordpress to make different items of the admin menu posts with different key?

Hello! There was a custom record type lesson on wordpress.

On the website I use 2 types of single classes ($single_lesson) and recurring ($repeater_lesson), which differ selected in the advanced custom fields key lesson_single.

Code function.php
//check type of record
add_action( 'init', 'register_my_cpt' );
register_my_cpt function() {
 register_post_type('lesson', array(
 'public' => true,
 'has_archive' => true,
 'menu_icon' => 'dashicons-welcome-write-blog',
 'label' => 'Classes',
 'rewrite' => array(
 'slug' => 'lesson', 
 'with_front' => false
),
 'supports' => array( 'title', 'editor', 'thumbnail' )
));
 }


In the admin, both single and repeated events appear in the stream all together in one list, that is not convenient to monitor and edit.
Is there any possibility to divide them in different sections of the admin menu to not interfere with each other or is it only possible through the registration of a new record type?

If so, how?

//output
 $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'
)
)
 ) );
March 12th 20 at 08:39
0 answer

Find more questions by tags WordPress