function template_chooser($template)
{
    $post_id = get_the_ID();
    //logit($template,'$template: '); // is /Users/ddropik/sites/cm.localhost/wp-content/themes/twentyfifteen/single.php
    if (get_post_type($post_id) != 'team') {
        return $template;
    }
    if (is_single()) {
        return ct_get_template_hierarchy('single');
    }
    if (is_archive()) {
        return ct_get_template_hierarchy('archive');
    }
}
Beispiel #2
0
function template_chooser($template)
{
    $post_id = get_the_ID();
    if (get_post_type($post_id) != 'cals_team_members') {
        return $template;
    }
    if (is_single()) {
        return ct_get_template_hierarchy('single');
    }
}