Is there a way to set different post templates for parent posts and child posts in the same post type?
Simplest way is to use single_template filter hook (one of the {$type}_template hooks). It is fired by WordPress to filter the template file found for singular post requests. add_filter(‘single_template’, function($template) { $queried = get_queried_object(); if ( $queried->post_type === ‘clients_projects’ ) { // only for this CPT // file name per OP requirements $file=”clients_projects_”; $file .= … Read more