title: WordPress: search by Term, Post meta OR Post title together
body: <p>we are writing a custom search function which searches for the posts by given Term <strong>OR</strong> Post Meta <strong>OR</strong> post_title</p>
  
  <p>We have multiple terms and Post Meta values and We're looking for the solution to apply <strong>OR</strong> operation on few meta &amp; term values.</p>
  
  <p>bellow is the query that we have so far but ofcourse, is not working as we required</p>
  
  <pre><code>$search_keyword = $_GET['search_keyword'];
  
  $args = array(
      'post_type' =&gt; 'product',
      'post_title' =&gt; $search_keyword,
      'tax_query' =&gt; array(
          array(
              'taxonomy' =&gt; 'property-city',
              'terms' =&gt; $search_keyword,
              'field' =&gt; 'slug',
              'operator'  =&gt; 'LIKE'
          ),
          array(
              'taxonomy' =&gt; 'property-type',
              'terms' =&gt; array('sale', 'rent'),
              'field' =&gt; 'slug',
              'operator'  =&gt; 'IN'
          )
      ),
      'meta_query' =&gt; array(
          array(
              'key' =&gt; 'min_beds',
              'value' =&gt; '2',
              'compare' =&gt; '&gt;=',
          ),
          array(
              'key' =&gt; 'min_baths',
              'value' =&gt; '1',
              'compare' =&gt; '&gt;=',
          ),
          array(
              'key' =&gt; 'address',
              'value' =&gt; $search_keyword,
              'compare' =&gt; 'LIKE',
          )
      )
  );
  
  $the_query = new WP_Query($args);
  </code></pre>
  
  <p><code>$search_keyword</code> contains the string value that needs to search. And only those posts should be selected that have a meta key matched with given <code>$search_keyword</code> <strong>OR</strong> matched with term <strong>OR</strong> matched with Post Title </p>
  
  <p>also, keeping the other conditions as it is.</p>
  
  <p>NOTE: relation b/w Taxonomy <code>property-type</code> and Post Meta <code>min_beds/min_baths</code> should be <strong>AND</strong> </p>