Hello @mbv,
If you take a look at the create post type function:
function cp_create_post_type() {
$labels = array(
'name' => _x( 'Private Pages', 'post type general name', 'client-portal' ),
'singular_name' => _x( 'Private Page', 'post type singular name', 'client-portal' ),
'menu_name' => _x( 'Private Page', 'admin menu', 'client-portal' ),
'name_admin_bar' => _x( 'Private Page', 'add new on admin bar', 'client-portal' ),
'add_new' => _x( 'Add New', 'private Page', 'client-portal' ),
'add_new_item' => __( 'Add New Private Page', 'client-portal' ),
'new_item' => __( 'New Private Page', 'client-portal' ),
'edit_item' => __( 'Edit Private Page', 'client-portal' ),
'view_item' => __( 'View Private Page', 'client-portal' ),
'all_items' => __( 'All Private Pages', 'client-portal' ),
'search_items' => __( 'Search Private Pages', 'client-portal' ),
'parent_item_colon' => __( 'Parent Private Page:', 'client-portal' ),
'not_found' => __( 'No Private Pages found.', 'client-portal' ),
'not_found_in_trash' => __( 'No Private Pages found in Trash.', 'client-portal' )
);
$args = array(
'labels' => $labels,
'description' => __( 'Description.', 'client-portal' ),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => false,
'query_var' => true,
'capability_type' => 'post',
'has_archive' => false,
'hierarchical' => true,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'revisions' ),
'exclude_from_search' => true,
'show_in_rest' => true
);
if( !empty( $this->options['page-slug'] ) ){
$args['rewrite'] = array( 'slug' => $this->options['page-slug'] );
}
else{
$args['rewrite'] = array( 'slug' => $this->defaults['page-slug'] );
}
if( !empty( $this->options['support-comments'] ) && $this->options['support-comments'] == 'yes' )
$args['supports'][] = 'comments';
register_post_type( 'private-page', $args );
}
There is an argument called show_in_menu. Setting that to true might solve the issue you are facing.