title: Pass multiple arguments to WP_Query
body: <p>I'm clearly not doing this right. Any help would be greatly appreciated. Essentially i am pulling nearby zip codes and city names to a search that is being done. i then want to use WP_Query to pull the WordPress post types matching those zip codes and city names. I'm not super familiar with WordPress, so it is highly likely i'm way off base on how to do this:</p>
  
  <pre><code>$url = "http://www.zipcodeapi.com/rest/OeAp3k78myEhBy0oqSlQSlUWOt6N7TjW8Tlbdtkz1YRCwS1WKmNDIHzwbFjizCeI/radius.json/" . $searchbox . "/100/km";
  $response = file_get_contents($url);
  $json = json_decode($response);
  
  $post_type = 'location';  
  $citysearcharray = array();
  $zipsearcharray = array();
  
  $searcharray = array();
  foreach($json-&gt;zip_codes as $nearbyzip)
  {
  
      $citysearcharray[] = array(
          'key'       =&gt; 'city',
          'value'     =&gt; $nearbyzip-&gt;city,
          'compare'   =&gt; '='
      );
  
      $zipsearcharray[] = array(
          'key'       =&gt; 'zip_code',
          'value'     =&gt; $nearbyzip-&gt;zip_code,
          'compare'   =&gt; '='
      );
  }
  
              $args = array(
              'post_type'       =&gt; $post_type,
              'post_status'     =&gt; 'publish',
              'caller_get_posts'=&gt; 1,
              'posts_per_page'  =&gt; 10,
              'meta_query'    =&gt; array(
                  'relation'      =&gt; 'OR', 
              $citysearcharray,
              $zipsearcharray));
  
      $my_query = null; 
      $my_query = new WP_Query($args);
  
      if( $my_query-&gt;have_posts() ) {
          $count=0;
  
  
          echo '&lt;ul class="location"&gt;';
              while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post();
  ...
  </code></pre>
  
  <p>Amy i putting the $args together correctly?</p>
  
  <p>TIA</p>