title: Woocommerce Advanced Search with Attributes
body: <p>I hope someone can help me with this.  I have a woocommerce site that all of my products have an attribute of a specific city.  I would like the main product search to have a text field and a drop down of the the cities so the results are only products with the relevant term in the specified city.  </p>
  
  <p>I cannot find anything on how to add the attribute drop down and make sure that this filter is part of the search query.  Help!</p>
  
  <p>Update:</p>
  
  <p>Found something useful by using taxonomies in a drop down menu on the searchform.php file:</p>
  
  <pre><code>            &lt;?php
              function get_terms_dropdown($taxonomies, $args){
              $myterms = get_terms($taxonomies, $args);
              $optionname = "optionname";
              $emptyvalue= "";
              $output ="&lt;select name='".$optionname."'&gt;&lt;option selected='".$selected."' value='".$emptyvalue."'&gt;Select a City&lt;/option&gt;'";
  
              foreach($myterms as $term){
              $term_taxonomy=$term-&gt;pa_city; //CHANGE ME
              $term_slug=$term-&gt;slug;
              $term_name =$term-&gt;name;
              $link = $term_slug;
              $output .="&lt;option name='".$link."' value='".$link."'&gt;".$term_name."&lt;/option&gt;";
              }
              $output .="&lt;/select&gt;";
              return $output;
              }
  
              $taxonomies = array('pa_city'); // CHANGE ME
              $args = array('order'=&gt;'ASC','hide_empty'=&gt;true);
              echo get_terms_dropdown($taxonomies, $args);
  
              ?&gt;
  </code></pre>
  
  <p>Only problem is I cannot find where to pass the option name taxonomy in woocommerce.  This search does not appear to use search.php.  Does anyone know where I can pass this in woocommerce?</p>