Try setting an array for meta_query
instead, I do not think using just a string for it is the intended usage, but this may work instead in your case:
'meta_query' => array(
array(
'key' => '_thumbnail_id',
'compare' => 'EXISTS'
)
)
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
- 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?
- Query posts only without featured image
- 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
- meta_query with meta values as serialize arrays
- WordPress tax_query “and” operator not functioning as desired
- Custom taxonomy query broken after upgrade to 4.4
- Show all products on one page with WooCommerce
- WP_Query pulling an extra post per page
- “pre_get_posts” firing on every query
- modifying meta_query on parse_query
- Use Transient API to cache queries for all posts in all categories?
- What’s wrong with this WP query?
- querying on custom meta fields and sorting them by custom meta
- WP Query by Gutenberg block and get its attribute
- How do I search WordPress by different fields without a plugin?
- Retrieve products with specific attribute and in category – woocommerce
- How do I “orderby” a column without losing posts that don’t have the column?
- Foreach-generated custom tax queries, each with an ajax “Load more” button
- Compile meta values from custom loop into array and then calculate sum total
- Get posts using WP_Query
- How is WP_Query connected to WP_Post in The Loop?
- How to use order RAND() on WordPress?
- WP_QUERY loop, offset in the arguments and the paginate_links – can these work together?
- wp_query for displaying attachments with a tag
- Mysql query LIKE not working
- Query: offset post list, unless it’s a specific category
- Multiple taxonomy And acf filter group by
- WP_Query Not Recognizing Taxonomy Parameter in Custom Search
- Sorting events by descending date, and ascending time if multiple events on a date
- WP_Query orderby author__in
- Take all produts by category
- Custom Query include private posts in pagination count calculations?
- Automatically Query Parent Taxonomy
- Shouldn’t I be able to modify the main query by this filter?
- insert value from html into data base with wordpress
- Debugging wp_query orderby for taxonomy
- Get all posts which was posted on X Days WordPress
- Pagination is not working with custom query inside a homepage template
- Display posts with specific value first in query
- wp_query comment and meta query
- Show menus to one admin username
- inserting content of 1 Post to in another with a template hierarchy
- Get the child category ID of current category
- I need to run a AJAX Fuction from within a WP_Query but only works on first item
- Category not being selected
- WP_Query with 4 post meta field arguments gives 500 internal server error
- Limit number of posts in WP_query per month
- How to filter a static post page with ajax and $wp_query
- Use have_posts() with array of post results retrieved by $wpdb->get_results
- how to translate countries output from wp database?
- Custom query does not find pages
- wp-query and wp_get_post_terms on custom taxonomy archive page
- How to combine meta_query and date_query with condition in WordPress
- What’s wrong with this meta query? (order by meta key, then title, doesn’t work)
- get_posts function not returning any results
- INNER JOIN custom tables – SQL Query
- SELECT TOP 1 in wp_query for each groupby meta value
- Get unique post by meta value using wp_query
- WP Query. Ordering posts by another post types meta
- How to display author meta and count numbers for each user in comment.php?
- update_post_meta() not updating
- XMLRPC pingback.extensions.getPingbacks not work with parameters
- Get top 5 posts viewed using post_views_count
- Get posts meta_query by repater field
- WordPress pagination not returning posts on second page
- Track write actions to the database
- How can I use two custom fields in WP Query
- How can I use a specific wordpress page template if certain words are used in page title [closed]
- how to exclude store in clipper theme wordpress code php
- Get a list of the last posts grouped by author and filtered by category
- How to return value from sql and display it
- Letting users sort posts
- Get comment number by date range?
- WordPress Show 4 posts from 4 specific categories in a slider
- WordPress – Optimize the Meta Query for 3 meta keys at a time