title: WordPress Custom Post URL Query
body: <p>I've been searching the web and rattling my brain for weeks but to no avail.</p>
  
  <p>I have a product database on WordPress (v3.4) and I am trying to make it searchable using URL queries.</p>
  
  <p>Ideally this is the scenario I want:</p>
  
  <ul>
  <li>domain/products - to show all of the products   </li>
  <li>domain/products?tax1=term1 - to filter the products by a taxonomy   </li>
  <li>domain/products?tax1=term1&amp;tax2=term2 - to filter my multiple<br>
  taxonomies.</li>
  </ul>
  
  <p>The post_type is called 'product' and I currently have a page called products with a page-template assigned to it. However, whenever I try to use the WordPress URL queries is redirects me to a similar URL'd news post (e.g. domain/2011/10/01/products-are-cool).</p>
  
  <p>How do I go about creating these filters and having them display the results correctly?</p>
  
  <p>UPDATE: I've come up with a solution that works perfectly for me.</p>
  
  <pre><code>if(isset($_GET)) $options = $_GET;
  
  if (!empty($options)) {
  $posts = new WP_Query( array(
  'post_type' =&gt; 'product',                       
  'orderby' =&gt; 'title',                       
  'order' =&gt; 'asc',                       
  'paged' =&gt; $paged,                      
  'tax1' =&gt; $options['tax1'],                 
  'tax2' =&gt; $options['tax2'],
  ));
  </code></pre>
  
  <p>And then use <code>add_query_arg($termslug,$term-&gt;slug)</code> to append the taxonomies onto the URL.</p>