When your website means business.

Search | Type: PHPSearch Results on Which Template

When you need a custom results template for a CPT.

function template_chooser($template) {
  global $wp_query;
  $post_type = get_query_var('post_type');
  if( $wp_query->is_search && $post_type == 'clients' ) {
    return locate_template('page_clients.php');
  return $template;
add_filter('template_include', 'template_chooser');
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Cookies Notice