How to create a custom search for custom post type?
Here is what I’ve tried and got a solution with 3 steps. Let’s say your custom post type is “products“ 1 . Add Function Code here you can specify the archive-search.php function template_chooser($template) { global $wp_query; $post_type = get_query_var(‘post_type’); if( $wp_query->is_search && $post_type == ‘products’ ) { return locate_template(‘archive-search.php’); // redirect to archive-search.php } return … Read more