How to make all post under post_type to draft or return a 404?

Not tested, but if I have inderstood the question correctly, please try the below solution. Articles post type will return a 404 but posts under movies categories will not.

Code goes in a functions.php of your child theme.

function rr_404_custom_post_types()
        {
          global $wp_query;
          if (is_single() && !($wp_query->post->post_type == 'movies')) {
            $wp_query->set_404();
            status_header(404);
          }
        }
        add_action('template_redirect', 'rr_404_custom_post_types');

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino