title: Listing post with this way "domain.com/taxonomy/category
body: <p>I am triying to modify wordpress (version 3.3) to list post with one category and with one taxonomy.</p>
  
  <p>I have got a taxonomy called "location". If I do example.org/location/canada, it works. Now I want url rewrite for example.org/location/canada/category/dogs, but i cant achieve it.</p>
  
  <p>I added to functions.php this code:</p>
  
  <p>function eg_add_rewrite_rules() {
      global $wp_rewrite;</p>
  
  <pre><code>$new_rules = array(
      'location/(.+)/category/(.+)/?$' =&gt; 'index.php?location=' . $wp_rewrite-&gt;preg_index(1) . '&amp;category_name=' . $wp_rewrite-&gt;preg_index(2)
  );
  $wp_rewrite-&gt;rules = $new_rules + $wp_rewrite-&gt;rules;
  </code></pre>
  
  <p>}
  add_action( 'generate_rewrite_rules', 'eg_add_rewrite_rules' );</p>
  
  <p>Also i have added this:</p>
  
  <p>function eg_add_query_vars( $query_vars ) {
      $new_vars = array( 'location' );</p>
  
  <pre><code>return array_merge( $new_vars, $query_vars );
  </code></pre>
  
  <p>}
  add_filter( 'query_vars', 'eg_add_query_vars' );</p>