Problem:
Remove ‘Content Template’ and ‘Template Layout’ widgets/metabox for certain CPT in admin screen (WP post edit screen).
Solution:
Please add this code in your theme’s or child theme’s functions.php file:
add_action( 'admin_head', 'wpv_custom_admin_head', 20);
function wpv_custom_admin_head() {
remove_meta_box( 'wpddl_template', 'book', 'side' ); // replace book with your CPT slug
remove_meta_box( 'views_template', 'book', 'side' ); // replace book with your CPT slug
}
==> Whereas ‘book’ should be replaced with your CPT slug.
Relevant Documentation:
https://codex.wordpress.org/Function_Reference/remove_meta_box