title: I have query to retrieve all posts in wordpress but how can i check the condition for post meta_key =“develop” and meta_value='anything'
body: <pre><code>SELECT DISTINCT date(p.post_date) as post_date
  FROM $wpdb-&gt;posts p
  LEFT JOIN $wpdb-&gt;postmeta pm ON p.ID = pm.post_id
  WHERE p.post_status='publish'
      AND p.post_type IN ('%s')
  ORDER BY p.post_date DESC
  </code></pre>
  
  <p>Here it reads all dates of the posts. My problem is that query should exclude the posts which has meta_value(it can be anything) of which meta_key="develop" . How can i write the query for that ?</p>
  
  <p>I feel it will be in this form for wp_query</p>
  
  <pre><code>$args[ 'meta_query' ]= array (
  
          'relation'= &gt;' AND ',
  
                  array (
                          'key' = &gt; 'respect' 
                  ),
                  array (
                          'key' =&gt; 'develop',
                          'compare' =&gt; 'NOT EXISTS'
  
                  )
              ); 
     $query = new Wp_query($args);
  </code></pre>