[ad_1]
Hello,
In order to correct the search, i’ve just added “return $template;” at the end of function wptm_template_chooser.
There were no else statement what caused a blank page.
The corrected function is :
function wptm_template_chooser( $template ) {
// Post ID
$post_id = get_the_ID();// For all other CPT
if ( get_post_type( $post_id ) != 'team_manager' ) {
return $template;
}
//Use team_manager template
if ( is_singular('team_manager') ) {
return wptm_get_template_hierarchy( 'single-team_manager' );
}
return $template;
}
Thanks