Home Forums Bug Reports Loading failed in select field


Loading failed in select field

  • hi

    when i add this code to function file i get error in select field “loading failed”

    function template_chooser($template)
      global $wp_query;
      $post_type = get_query_var('post_type');
      if( $wp_query->is_search && $post_type == 'mo_forms' )
        return locate_template('search-mo_forms.php');
      return $template;
    add_filter('template_include', 'template_chooser');

    i need this code for search specific post type, how can i fix it

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.