title: Display posts that have two taxonomies in Wordpress wp_query
body: <p>I'm looking to display posts if they match two separate taxonomies, which are bridal accessories free and glasgow. </p>
  
  <p>At the moment I can get the wp_query loop code below to show all the results from both taxonomies; however I need the loop to display only the posts that have both the categories selected.</p>
  
  <pre><code>&lt;?php
      /**
       * Create a new WP_Query
       * Set $wp_query object to temp
       * Grab $paged variable so pagination works
       */
      ?&gt;
      &lt;?php
          global $wp_query; $post; $post_id = $post-&gt; ID;
          $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
          rewind_posts();
          $temp = $wp_query;
          $wp_query = NULL;
  
          $post_type = 'place'; // change this to the post type you want to show
          $show_posts = '30'; // change this to how many posts you want to show
          $category_name = 'bridal-accessories-free,special-offer' // change this to the category name you need
  
      ?&gt;
  
      &lt;?php $wp_query = new WP_Query( 'placecategory=' . $category_name . '&amp;post_type=' . $post_type .  '&amp;posts_per_page=' . $show_posts . '&amp;paged=' . $paged ); ?&gt;
          &lt;?php while ( $wp_query-&gt;have_posts() ) : $wp_query-&gt;the_post(); ?&gt;
              &lt;p style="font-size: 15px; margin-bottom: 10px;"&gt;&lt;span style="font-weight: normal; margin-right: 5px; text-transform: uppercase; color: #a5cc8e;"&gt;&lt;?php the_title(); ?&gt;&lt;/span&gt; &lt;span style="margin-right: 5px; color: #000;"&gt;&lt;?php echo get_post_meta($post-&gt;ID,'geo_address',true);?&gt;&lt;/span&gt; &lt;?php $contact = stripslashes(get_post_meta($post-&gt;ID,'contact',true)); 
                      if($contact &amp;&amp; get_option('ptthemes_contact_on_detailpage') == 'Yes') { ?&gt;&lt;?php echo PHONE.": "; ?&gt; &lt;?php echo $contact;?&gt;&lt;?php } ?&gt;
          &lt;?php endwhile; ?&gt;&lt;/p&gt;
      &lt;?php wp_reset_query(); ?&gt;
  
      &lt;/div&gt;
  </code></pre>
  
  <p>If this can be done, is there anyway to pass the loop query variables into the url. We need this to create a link to the results.</p>
  
  <p>Thanks in advance!</p>