Is it possible to arrange Custom Post Types from CPTUI into a Folder?

There are multiple ways to remove or re-order these. I’ve created couple of post types (Test1, Test2, Test3) to test following ways.

enter image description here

CPT UI configuration way

You can add new post types with Settings > Show in menu set to False and the post type will not appear in menu at all.

enter image description here

Plugin way

You might want to try plugin such as Admin Menu Editor (https://wordpress.org/plugins/admin-menu-editor/) in combination with previous setting, that will let drag and drop edit your menu and add the links to the post types that don’t show in menu.

enter image description here

Manual code way

You can achieve same results as above by hardcoding this into custom plugin or your theme’s functions.php for example. The manual way would filter register_post_type_args hook.

function wp332896_custom_post_type_args( $args, $post_type ) {
    $post_types_to_not_show_in_menu = ['test1', 'test2', 'test3'];
    if ( in_array($post_type, $post_types_to_not_show_in_menu) ) {
        $args['show_in_menu'] = false;
    }

    return $args;
}
add_filter( 'register_post_type_args', 'wp332896_custom_post_type_args', 20, 2 );

Note that this is basically the same as using CPT UI configuration to change Show in menu value to false, just wrote to code. Variable $post_types_to_not_show_in_menu holds array of post types that are not to be shown in menu.

Dynamic code way

If you wanted to do this for all the post types registered with CPT UI, we could use CPT UI’s function cptui_get_post_type_data().

function wp332896_custom_post_type_args( $args, $post_type ) {

    $post_types_to_not_show_in_menu = [];

    if (function_exists('cptui_get_post_type_data')) {
        $post_types_to_not_show_in_menu = array_column(cptui_get_post_type_data(), 'name');
    }

    if ( in_array($post_type, $post_types_to_not_show_in_menu) ) {
        $args['show_in_menu'] = false;
    }

    return $args;
}
add_filter( 'register_post_type_args', 'wp332896_custom_post_type_args', 20, 2 );

Note that $post_types_to_not_show_in_menu now uses that function to get all names of post types registered with CPT UI.

To finish it, you can add “folder” with these post types as submenu. I’ll connect the folder and the submenu pages by using string “cptfolder”, but you can have just about any.

function wp332896_folder_menu() {

    $menu_slug = 'cptfolder';

    add_menu_page('Folder', 'Folder', 'manage_options', $menu_slug);

    $cpt_post_types = [];

    if (function_exists('cptui_get_post_type_data')) {
        $cpt_post_types = cptui_get_post_type_data();
    }

    foreach($cpt_post_types as $post_type) {
        add_submenu_page($menu_slug, $post_type['label'], $post_type['label'], 'manage_options', 'edit.php?post_type=".$post_type["name']);
    }
 }

add_action('admin_menu', 'wp332896_folder_menu');

enter image description here