conditional search

solution 1:

  1. this can be done by adding the drop down menu to the search form.eg cat_slct

  2. create a search template if its not exist in your theme.

  3. add an if statement at the top of the page and directly after get_header();

if(isset($_POST['cat_slct'])){

    //make the query using the name of the categoty you'v just received via $_POST[].
    //or search within the database if necessary using the $wpdb object,it helps a lot.
}

}else{

    //the search page as its without modifying.
    //just you have to add the closing else tag before the get_footer(); 

}//right before the get_footer()

solution 2:

  1. same as solution 1 but this time you’ll create a page template and call it custom_search.

  2. now go ahead and create a page that uses the custom_page template..eg name it search_cats.

  3. tha different here is that you’ll set the action of your targeted search forms to this page.

  4. same as before: get the posted data and insert it into the query then do the regular loop.