function cptui_register_my_cpts_artist() {

/**
* Post Type: artist.
*/

$labels = [
“name” => __( “artist”, “tcd-w” ),
“singular_name” => __( “artist”, “tcd-w” ),
];

$args = [
“label” => __( “artist”, “tcd-w” ),
“labels” => $labels,
“description” => “”,
“public” => true,
“publicly_queryable” => true,
“show_ui” => true,
“show_in_rest” => true,
“rest_base” => “”,
“rest_controller_class” => “WP_REST_Posts_Controller”,
“has_archive” => true,
“show_in_menu” => true,
“show_in_nav_menus” => true,
“delete_with_user” => false,
“exclude_from_search” => false,
“capability_type” => “post”,
“map_meta_cap” => true,
“hierarchical” => false,
“rewrite” => [ “slug” => “artist”, “with_front” => true ],
“query_var” => true,
“supports” => [ “title”, “editor”, “thumbnail” ],
];

register_post_type( “artist”, $args );
}

add_action( ‘init’, ‘cptui_register_my_cpts_artist’ );