Per the Codex article on WP Query:
ignore_sticky_posts (boolean) – ignore sticky posts or not. Default value is 0 – don’t ignore sticky posts. Note: ignore/exclude sticky posts being included at the beginning of posts returned, but the sticky post will still be returned in the natural order of that list of posts returned.
Adding 'ignore_sticky_posts' => 1
to your $args
array will stop sticky posts from showing up when you don’t want them. Then 'meta_key' => '_thumbnail_id',
can succeed at filtering out posts without featured images.
Related Posts:
- How do I show sticky posts on a static front page that also contains content?
- query posts in wordpress
- posts_nav_link(); not showing up on static pages
- Get list of months with posts
- Why is the first query affecting the second query, even after wp_reset_query() and wp_reset_postdata(), but not on the second page?
- Custom URL parameters in template files
- Metadata Query when storing data as array possible?
- How to query the latest 5 posts and sort them by title?
- 2 loops, is_home won’t work, count is off
- How can I prevent posts with no title showing up in my query?
- How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?
- CSS class on last post in loop ( custom query )
- Custom Post Type Query issue
- How to order by multiple date meta_values?
- How to create query to get top 3 sticky/latest posts
- WP_Query not getting all posts, just tagged posts
- tag__in does not return posts
- View list of all attachments on site
- multiple queries to get posts from same category?
- Best practice for implementing a blog page / section in wp_menu_nav()
- Not the typical order by posts by date question
- Paginated WP_Query doesn’t return 404’s, even when posts don’t exist
- issue displaying variations in custom template using WPeC 3.8.9.2
- Why ignore_sticky_posts argument is in sticky post query?
- How Do I Protect My Premium WordPress App Theme from Copying?
- When to use _e and __ for the translation?
- Get entered value of customiser field for live preview
- With WordPress themes, where do I store the images and files relatively?
- How to Include SVG sprites icons into the body tag? [closed]
- Why doesn’t /2013/01/ properly return January’s archives in archive.php?
- Excess White Space Above Admin Bar on Frontend Using Twitter Bootstrap
- Child Theme not loading parent CSS
- WordPress settings API error when checkbox unchecked
- How the WordPress sidebar works
- two tinyMCE editors in the same page
- Separated Comment from Post
- WordPress website loads but is not displayed until page scrolled
- wp_head() not inserting the default stylesheet style.css
- Theme Customizer not loading
- WordPress Customizer Control with React
- File Security Check in wordpress in index.php of theme
- Is my approach to enqueue styles inefficient?
- How do the default themes reference style.css?
- Input ordering in wordpress theme customizer
- Customize the previous_post_link output
- Which file handles the block latest posts, I want to examine excerpt handling
- Menu item added in wp_nav_menu_items filter is never highlighted
- How to Add Custom Button to Text(HTML) Editor and NOT Visual Editor
- Custom Nav Walker Trouble
- How to get javascript slider to work! [closed]
- Reactor Theme: Prevent Post Thumb on Post
- How to make permalinks update from code?
- How can I tell what category I’m in?
- Syntax error potentially causing CSS catastrophic failure
- Custom WordPress File Inclusion
- Redirect to another page using contact form 7? [closed]
- WordPress 3.8 Backend Admin Color Scheme add more scheme how to do?
- How to change the theme directory uri for localhost?
- Take control of WordPress before functions.php
- Why in the static pages of my theme are showing these information?
- featured content: which area does this cover [closed]
- How to count posts of a category and of a category limited by a tag
- Which cache is kicking
- How do I merge 2 WordPress Themes?
- Customizer: get_preview_url() inside customize_save_after hook
- Is there a way to switch to another theme?
- Right procedure when you develop a WP Website for a client
- Different themes on one site
- // File Security Check from WooCommerce [duplicate]
- Allow different tags in widget titles
- Switch theme if ie compatibility/quirks mode?
- Pagination and multiple loops
- Does wordpress add their own classes into nav menus?
- Available widgets is not showing up?
- Getting white screen of death on category pages because of body_class() function
- WordPress link to another page in site does not render a
- Developing WordPress site behind a static site
- Problem with Displaying Custom Theme Page’s Content
- Code showing in wordpress post titles around website
- HTML to → WP Conversion
- Add multiple sections, settings and controls at once to the Customizer
- Font not loading [closed]
- How to change parent permalink?
- how to call options on front end and add logo
- Loop carousel slider in wordpress
- Editable screenshot.png in a custom theme developed
- How to create multiple pages in a client theme?
- How to share posts (and plugins) between existing site and new, separate dev/test installation?
- get_theme_mod not pulling css colors into header using wp_head
- Duplicate WordPress site to subdirectory but use same db?
- Menu order of parent menu from perspective of child menu
- Conditional loop based on current page
- Theme customizer live preview JS- Trying to bind to an html image url without luck
- wp_deregister_script was called incorrectly
- Undefined index: debuging error for theme option template snippet
- Permalinks problem with custom theme
- Purchased Theme to Custom Made Theme? [closed]
- Creating image grid on products page in wordpress
- Insert gutenberg blocks into template
- How to make it so I can “use” template parts in (classic/full) site editor