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 );
Related Posts:
- Query posts only with featured image
- In loop: posts have thumbnail AND other variables
- post thumb nail
- Trying to check and see if a post has a featured image outside of the main loop
- Query sticky posts with thumbnails
- Retrieve featured image (thumbnail) url from multiple posts with one query
- Get image of latest post from taxonomies/categories
- Multiple instances of Featured Image Query
- post thumbnail not showing up with shortcode
- How WordPress attaches its Featured Images with posts?
- getting post thumbnail within loop causes an error
- WP_Query condition affects posts_per_page count
- Site not getting correct featured image from my query
- Retrieve posts using thumbnail id as meta key
- WP Query – Post Thumbnail
- How can I check for a thumbnail in WordPress?
- how would i change post->ID to work correctly when querying pages?
- How to display the featured image for each post?
- the_post_thumbnail do 2 queries. How to optimize
- Featured images loop for Orbit Slider
- how to put thumbnail below category’s title?
- WP_Query how to add a thumbnail to the first post from the last 5 posts?
- Featured Image as Background with Offset
- Trying to use “Medium” featured image for custom post type on home page
- wp_get_attachment_image not to get the post_thumbnaill
- Featured image not showing on page
- Display First posts without the default featured image
- Display only posts with thumbnails
- How to make WP_Query ‘post__in’ accept an array?
- Is it possible to orderby multiple meta_keys when using meta_value_num?
- WordPress 4.9.5 PHP intermittent warning trim() expects parameter 1 to be string, array given
- Merging multiple wp_query objects
- Query causing load because of SQL_CALC_FOUND_ROWS post counting?
- Using custom meta_query with relation not working as expected
- Nested query inside Logical operator OR not working in meta_query
- SQL Statement generated by WP_Query not producing expected results
- Only show first post to match certain criteria within WP_Query
- What is an efficient way to query based on post_meta?
- How to order a post type with meta_value_num and if meta_value_num does not exist then order by date
- Pagination wont work with search results template [duplicate]
- difference between $wp_the_query and $wp_query? & getting the values properly [duplicate]
- WP_Query pagination not working in admin area
- Custom Field sort not working (WP 3.8.1)
- Get post ID’s from one query and exclude from another
- What are the differences between “Latest Posts” and “Static Page”?
- WordPress Query is taking more then 20 second and stuck on creating index
- Modifying raw $_POST data early in the lifecycle
- Get the Plugin Which Triggered a MySql Query in WordPress?
- Difficulty with rewrite rules
- Show selected images on top in Media Manager
- Complex date range with WP_Query and BETWEEN
- Is there a way to include a post multiple times in the same query result?
- showing all search result in one template
- List custom taxonomy terms sharing posts with a term from a second custom taxonomy
- WP Query Args – Title or Taxonomy Value
- Ajax WP_Query reutrns no results on author.php
- Large AND OR query timing out
- WP_query wp_posts_counts returns only count of admin and not users
- Categorising search results based on Custom Fields
- How to query for all posts that have a particular meta key?
- Custom taxonomy.php not working
- Ajax future single post query doesn’t work when NOT logged in
- Conditional sorting with variable using WP Query
- WP_Query posts with comments only
- Default permalink structure causing Notice: Undefined property: WP_Query::$post
- Get posts that do not have the same tags as current
- Exclude a Woocommerce product from WP_Query
- Expecting statement error from php loop using ACF plugin
- Get specific ACF key and value from all posts – no access to DB
- How do I sort this custom list of sticky posts
- Query only displays one page_id
- WP_Query will not display draft posts
- All Posts Have The Same Comments
- Trying to get property of non-object in: $wp_query
- I am officially missing something about transient posts
- Register Taxonomy – What is `query_var`?
- Get Post ID as a separate RSS feed item
- Block internal search queries with pre_get_posts and regex rules
- Is it possible to give a classname to specific comments in the WordPress admin?
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- Is there documentation for objects returned by WP_Query?
- Custom post type loop error: Trying to get property of non-object
- Search Field that allows options of “Match any keyword” or “Match all keywords”
- WP_Query for posts that have postmeta assigned to a taxonomy
- Getting the last X posts, but in ascending order of time
- Show more than one post on the main page excluding certain category
- How to make a wordpress loop file that displays posts based on certain conditions
- WP_Query with MetaQuery issue
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- Comment count same for every post in homepage WP_Query
- How do I display posts with specific value in a custom field into my loop?
- Orderby Meta Value and Query from Meta Query
- Order by multiple meta keys on wordpress
- Sort posts in dashboard using custom field; also include posts where field isn’t set
- I want to capture the last day’s (today) posts in a category in the numbered order in acf
- How do I have multiple metaqueries inside one wordpress query
- Query All Posts: Either Display Most Recent or One with Particular ACF Value Chosen
- Why am I getting no results of a query placed after another query?
- Can I use WP_Query to find a post with a particular menu_order?
- How to efficiently find “duplicate” posts, where the titles are different, using metadata to match posts?