Yes. you can use the cun_content_types filter. Currently the default is posts and pages, and the standard way would be to add them. But if you’re adding numerous custom post types (which is odd, but that’s neither here nor there) you would want to get a list of them by using the get_post_types function (using whatever criteria fits your need) and then feeding that into the function.
https://codex.ww.wp.xz.cn/Function_Reference/get_post_types
Here’s an example.
function rkv_add_cun_type( $types ) {
// Get a list of all the available post types.
$list = get_post_types( '', 'names' );
// Loop the names and add to the array.
foreach ( $list as $single_type ) {
// Check for the post type, then add it.
if ( ! in_array( $single_type, $types ) ) {
$types[] = $single_type;
}
}
// Return the post type array.
return $types;
}
add_filter( 'cun_content_types', 'rkv_add_cun_type' );
Thanks for your quick reply.
But that’s not ok with all the custom types and metaboxes/fields, it’s going to go crazy and send hundreds of emails for a simple field change…
I’ll try to find out another solution related to your idea.
PS: the custom post types are useful for directories, and there you need multiple post types (there will not be too many(as stated above), because we also use categories and specific fields based on the categories and post types)
Well, is there some way you can pull a list of the post types that are set up the way you want? However you can get an array of the post types you want to have set up, feed that into the function above.