Ok, here is something that I have come up with and tested on my site.
Note that this is quite raw (I.e. no styling), and you'll probably need to add some resiliency to it just in case you get some unexpected results, but that is all up to you I'm afraid.
Here is the search form. I've not added an action
because I don't know where you want to redirect the form. However, by default you will be directed back to the same page, so you can just query the posts there.
<form method="POST">
<h3>Search for posts</h3>
<?php
$taxonomies[] = get_taxonomy('author');
$taxonomies[] = get_taxonomy('title');
$taxonomies[] = get_taxonomy('editor');
$options = array();
if(!empty($taxonomies)) : foreach($taxonomies as $taxonomy) :
if(empty($taxonomy)) : continue; endif;
$options[] = sprintf("\t".'<option value="%1$s">%2$s</option>', $taxonomy->name, $taxonomy->labels->name);
endforeach;
endif;
if(!empty($options)) :
echo sprintf('<select name="search-taxonomy" id="search-taxonomy">'."\n".'$1%s'."\n".'</select>', join("\n", $options));
echo '<input type="text" name="search-text" id="search-text" value=""></input>';
echo '<input type="button" name="search" id="search" value="Search"></input>';
endif;
?>
</form>
Now, add this just before you output your posts -
if(!empty($_POST['search-text'])) :
$args = get_search_args();
query_post($args);
endif;
Finally, add this to your function.php
so that you can go grab the relevant $args
function get_search_args(){
/** First grab all of the Terms from the selected taxonomy */
$terms = get_terms($_POST['search-taxonomy'], $args);
$needle = $_POST['search-text'];
/** Now get the ID of any terms that match the text search */
if(!empty($terms)) : foreach($terms as $term) :
if(strpos($term->name, $needle) !== false || strpos($term->slug, $needle) !== false) :
$term_ids[] = $term->term_id;
endif;
endforeach;
endif;
/** Construct the args to use for quering the posts */
$args = array(
'order' => ASC,
'orderby' => 'name',
'post_status' => 'publish',
'post_type' => 'post',
'tax_query' => array(
array(
'taxonomy' => $_POST['search-taxonomy'],
'field' => 'term_id',
'terms' => $term_ids,
'operator' => 'IN'
)
)
);
return $args();
}