title: WordPress Custom code based on meta query
body: <p>I have the following code:</p>
  <pre><code>    $sortable =  false;
              'post_type' =&gt; 'tour', 
              'post_status' =&gt; 'publish',
              'posts_per_page' =&gt; -1,
              'meta_query' =&gt; array(
                  array(
            $query = array( 
                'key' =&gt; 'rezdy_tour_type',
                      'value' =&gt; 'DAYTOUR'
                  )
              )
          ); 
  </code></pre>
  <p>I would love to add a specific script if my rezdy_tour_type == DAYTOUR, so I've tried:</p>
  <pre><code>    &lt;?php 
      global $post;
      if(get_post_meta($tour-&gt;ID, 'rezdy_tour_type', true) == 'DAYTOUR') { ?&gt; 
      mycustomscript
      &lt;?php 
      }
      else { ?&gt;
      &lt;?php 
      }
      ?&gt;
  </code></pre>
  <p>however I am not able to create the script. Some inside help would be truly appreciated, thank you</p>