function disable_comments_post_types_support() { $post_types = get_post_types(); foreach ($post_types as $post_type) { if(post_type_supports($post_type, 'comments')) { remove_post_type_support($post_type, 'comments'); remove_post_type_support($post_type, 'trackbacks'); } } } add_action('admin_init', 'disable_comments_post_types_support'); function disable_comments_status() { return false; } add_filter('comments_open', 'disable_comments_status', 20, 2); add_filter('pings_open', 'disable_comments_status', 20, 2);