title: Relationship between 2 custom posts in WP
body: <p>I created 2 custom post types with "Pods - Custom Content Types and Fields" plugin in WP named <code>Company</code> and <code>Location</code>. Furthermore I created relationship field in <code>Location</code> post type called <code>parent_company_name</code>.</p>
  
  <p>And now I'm trying to get posts by this relationship field.</p>
  
  <p>I tried this code:</p>
  
  <pre><code>$pos = get_posts(
      array(
          'numberposts' =&gt; 1000,
          'post_type' =&gt; 'location',
          'meta_key' =&gt; 'parent_company_name',
          'meta_value' =&gt; $full_company_name
      )
  );
  </code></pre>
  
  <p>however it returns an empty array.</p>
  
  <p>I know that for relationship between post type and taxonomy I can make something like this:</p>
  
  <pre><code>$posts_array = get_posts(
      array(
          'numberposts' =&gt; 1000,
          'post_type' =&gt; 'compan_name',
          'tax_query' =&gt; array(
              array(
                  'taxonomy' =&gt; 'type_of_compan',
                  'field' =&gt; 'slug',
                  'terms' =&gt; $company_slug,
              )
          )   
      )
  );  
  </code></pre>
  
  <p>But what can I do for 2 post types to get the same result?</p>