Support » Plugin: Custom Post Type Template Redirect » [Plugin: Custom Post Type Template Redirect] Why do you need this?

Viewing 1 replies (of 1 total)
  • The single-POSTTYPE.php option also works in child themes whereas the plugin only finds the file if it’s in the main theme directory.

    You should use locate_template() instead of TEMPLATEPATH to make it available to child themes.

    Not the tidiest of code, but it works:

    $testing = locate_template(array($wp->query_vars[“post_type”] . ‘.php’));
    if ( $testing <> “” ) {
    $cptdt_template = $testing;
    }else{
    $testing = locate_template(array(‘t_’ . $wp->query_vars[“post_type”] . ‘.php’));
    if ( $testing <> “” )
    $cptdt_template = $testing;
    }

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Custom Post Type Template Redirect] Why do you need this?’ is closed to new replies.