function szub_search_custom_template($template)
{
    if (is_search() && szub_is_search_key() && file_exists(get_template_directory() . '/search-transcript.php')) {
        $template = get_template_directory() . '/search-transcript.php';
    }
    if (!$template) {
        $template = get_query_template('search');
    }
    return $template;
}
Esempio n. 2
0
function szub_search_custom_template($template)
{
    $old_template = $template;
    if (is_search() && szub_is_search_key() && file_exists(TEMPLATEPATH . '/search-custom.php')) {
        $template = TEMPLATEPATH . '/search-custom.php';
    }
    if ($template == "") {
        //	mr.snow 28/03/2008
        //	this creates an infinite recursion
        //	get_query_template calls apply_filters('search_template') which again calls szub_search_custom_template which calls ...
        //	$template = get_query_template('search');
        //	so instead do nothing and everything works anyway
    }
    return $template;
}