note: Your code is not a loop, it’s a query to get a list of posts.
In your template there should be a loop (using that list of posts) with a function to call the featured image. This is where you should change the template, and remove the call to the featured image.
If you are only trying to select posts with no featured image, it is a completely different case. I’m not sure it can be done with a query. A simpler solutions could be to write a if-statement in your loop, to check if post has a featured image, if not, showing the post. This isn’t a pretty solution, because it could be possible that you query 20 posts, but since all have a featured image, none will be displayed.
Related Posts:
- In loop: posts have thumbnail AND other variables
- Query sticky posts with thumbnails
- WP_Query condition affects posts_per_page count
- How to display the featured image for each post?
- Some doubts about how the main query and the custom query works in this custom theme?
- Using a custom WP_Query with get_template_part loop
- Loop within a loop?
- How to list some posts first in the loop based on post id
- Display posts the match taxonomy term linked from wp_list_categoies?
- WordPress Custom Query to show posts from last x years
- How to order posts tag by tag?
- Pagination with 5 posts per page
- Merging a complex query with post_rewind and splitting posts into two columns
- Pagination Not working on Home Page with 2 Query
- meta_query not working properly
- Exclude post on loop by multiple meta key value
- Sort by meta key on archive page
- How to display 3 different loops in 3 columns on homepage
- Splitting the main query in multiple loops with query_posts and/or pre_get_posts?
- Show all parents and children in custom post type in right order
- Why is this coming back as null? Thats wrong. There is one post
- Retrieve featured image (thumbnail) url from multiple posts with one query
- Ignore post by meta value in the main query
- Multiple instances of Featured Image Query
- How to retrieve current page WP_Query arguments?
- post thumbnail not showing up with shortcode
- WP_Query doesn’t get sticky post at the top, when used in a page template
- How to limit WP_Query to one result on the loop?
- Prevent duplicate post from dynamic multiple loops
- if/else on custom query gives 200 OK when condition not met?
- Multiple Loops Inside a Function
- Sticky posts are not showing at the top of category posts
- Random loop with code to prevent duplicate output returns no output at all from time to time
- How to use offset in WP_Query
- Multiple loops without repeating content
- Can I set my WP_Query to be a Main Query?
- Group and list posts by custom taxonomy
- Show scheduled posts in main loop but not in WP_Query?
- Filtering posts from different categories into different section by doing WP_Query only once
- How to make search for posts using get method?
- How to get list of posts from permalinks?
- WP Query – Post Thumbnail
- Custom taxonomy.php not working
- different for loop if screen resolution < 1000px
- Transient api Caches confused
- how to use pre_gets_posts to exclude one queried ID from homepage loop
- sort and display posts by custom field (wp-query and the loop))
- Conditional operator OR not working with custom fields
- Get posts that do not have the same tags as current
- Should I reset $wp_query?
- Exclude a Woocommerce product from WP_Query
- WP_QUERY wrong ammount of posts
- How to add sort order to incremented and paginated category loop
- inserting content of 1 Post to in another with a template hierarchy
- Expecting statement error from php loop using ACF plugin
- How do I sort this custom list of sticky posts
- Query only displays one page_id
- Pagination for custom loop on custom page template is not displaying anything
- Filtering by multiple conditions in the loop
- How to access $wp_query object from array of posts given by get_posts?
- Display all attached image of every post of custom post type and link to original post
- Get posts with no tags?
- wp-query, pull children of parent page
- Writing less unnecessary code with WordPress
- I am officially missing something about transient posts
- How do I get the content of a custom instance of WP_Query?
- WordPress Queries Not Working?
- Filter subpages in while loop from WP Query object
- Use have_posts() with array of post results retrieved by $wpdb->get_results
- Custom query does not find pages
- How to sort by most watched in X days/months
- Magazine style frontpage with multiple categories/loops and no duplicate posts
- How can I use arrays and a foreach to generate many lists with WP_Query?
- How to use custom page for all posts with custom url, call another directory?
- display ACF repater field in archive page
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- WP_Query breaking the loop in a nested loop
- Related posts queries
- display the children of the post using the current page as the main parent
- Display 3 levels of categories on page
- update_post_meta() not updating
- Custom post type loop error: Trying to get property of non-object
- why default wordpress loop not working outside index.php
- how to show more than 1 post into three columns query
- Display three sequential posts on each page load, without repeating previous
- How to make a wordpress loop file that displays posts based on certain conditions
- active link for most recent post on vertical tabs
- wp_get_attachment_image not to get the post_thumbnaill
- How To Loop Through list with Custom Post Types
- custom query – offset to pagination
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- Issue in If else condition [closed]
- Pagination not working with WP_QUERY
- How do I display posts with specific value in a custom field into my loop?
- Order by multiple meta keys on wordpress
- Pagination problem with multiple loops on the same page
- Can’t seem to get an else statement correct? [closed]
- Output ACF field dynamicaly within a taxonomy loop [closed]
- How do I split a large query with a semi-expensive function included into multiple smaller queries
- Show number of posts AND number on current page (cannot make it work)