Try this code , its working for me
value=>'?'
because(value was required for NOT EXISTS
comparisons to work correctly prior to 3.9. You had to supply some string for the value parameter. An empty string or NULL
will NOT work. However, any other string will do the trick and will NOT show up in your SQL when using NOT EXISTS
.)
For more information about value=>?
please refer this link
$args = array(
'post_type' => 'post',
'posts_per_page' => 100,
'meta_query' => array(
array(
'key' => '_thumbnail_id',
'value' => '?',
'compare' => 'NOT EXISTS'
)
),
);
$new_query = new WP_Query( $args );