Why is that even happening aside, from quick look at core it does the following to achieve that in WP_Posts_List_Table
class:
$sticky_posts = implode( ', ', array_map( 'absint', (array) $sticky_posts ) );
$this->sticky_posts_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( 1 ) FROM $wpdb->posts WHERE post_type = %s AND post_status NOT IN ('trash', 'auto-draft') AND ID IN ($sticky_posts)", $post_type ) );
Related Posts:
- Exclude sticky post from main query?
- Show Sticky Posts in Category Archive
- Set sticky posts schedule (Automatic)
- Add a single featured post to all pages?
- Display only the most recent sticky post, display other posts in chronological order
- Include sticky posts in ‘Blog pages show at most’ X number of posts?
- Exclude expired sticky posts
- Exclude Sticky posts from Main Query break Pagination
- ignore_sticky_posts in WordPress 3.0.3?
- Exclude Current and Sticky Post
- Front page should display only one category of posts including sticky post with custom featured post box
- Make sticky post on save
- Pin a post to the top of a page, other than the home page
- Why WordPress CMS uses an array in wp_options instead of a field for Sticky posts?
- ignore_sticky_posts not working with word press version 3.9.1
- How to modify query on category pages to show only sticky posts?
- Make posts non-sticky
- How to check a post is sticky or not yet?
- Custom query: how to get the sticky posts first?
- I would like to change the sticky posts label “Featured” to something else
- How to display sticky post with custom html
- Update a post to remove sticky option
- Show image if a post is featured
- I do not want my front page sticky post to show up in a category
- How to display a sticky post inside a div?
- WooThemes Mini Features – modify query_posts to display only sticky_posts
- Exclude Sticky Posts as everyone!
- Don’t move sticky posts to the first page
- Latest Sticky Posts with Grid Thumbnails for static front page
- Remove old sticky post on publish
- Limit Number of Sticky Posts to Show
- Display latest sticky post or display nothing
- Create thumbs only when a post is sticky or any other way?
- How can I display only sticky posts from a parent category on the homepage?
- Images for sticky posts
- WP_Query: Why is sticky post not first item in loop?
- Ensuring sticky posts are retrieved first (without using two queries)?
- Highlight a Featured Post?
- Remove Trash / Delete option for Custom Post Type / Taxonomy
- How to make my front page display only the most recent sticky post, plus usual widgets?
- Limiting query_posts to 1, regardless of sticky post?
- How do I show sticky posts on a static front page that also contains content?
- How to add/retrieve the post trash link?
- How to retrieve sticky post in raw sql?
- Trash bin for categories
- wp_query for the first sticky, then display the rest of the posts excluding the first sticky
- Sticky Posts Not Sticking to Top of Category Archive
- How to hook in to bulk trash posts
- WordPress has a trash for users? (Wrong result for count_user, greater than expected)
- Restrict access to the Trash folder in Posts
- How to change redirect after moving a page to trash?
- Undelete post (untrash)?
- Is there an action that is called when a post is restored from the trash?
- get_post() function returns post even if it is trashed
- Exclude trash from save_post
- Dynamically create/remove terms in taxonomy when custom post type is published/trashed
- Include Sticky Posts in Page Post Count for custom query
- Query sticky posts with thumbnails
- How to remove sticky post capability for a specific user role?
- How to use custom fields to enable sticky posts on custom post types?
- Restore trashed posts with comments
- WP_Query doesn’t get sticky post at the top, when used in a page template
- Deleted pages showing up when querying for child pages
- Ignore sticky posts if post is not in meta query
- When trashing a post, also trash related comments
- Deleting the attached “comment replies” when trashing a comment
- Shortcode to delete post from front end
- Store sticky post’s ids in a transient
- Move sticky posts down in main loop
- wp_query should show stickies first
- How to stick custom post at the top in search results
- Woocommerce – Want to move the product tabs below short description
- Sticky posts per category
- How to display only feautured/sticky listings on the homepage
- Showing sticky posts with get_posts()
- Difficulty with PHP function that displays a post’s format in WordPress
- Sticky post for each category on category pages [duplicate]
- Only display sticky post or latest post in custom loop
- Exclude current sticky post
- Why: sticky front page code, shows latest non-sticky on logged-in front page
- How to restore all items from trash
- Can’t get pagination to work for sticky posts only
- How to display sticky or latest published post on the current category page it belongs to?
- Script doesn’t trash custom post types. Instead it duplicates the post and generate new versions in the trash
- How to change ‘Move to Trash’ to ‘Move to Draft’ for my blog’s users?
- Post deleted in trash [closed]
- Get all sticky posts from one user through user ID
- Custom loop off by one post
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- WordPress Sticky Post Count “Fix” Breaking Pagecount by 72 pages!
- Display Specific Posts at Start of Loop
- How to display sticky post always at the top (before regular post) in wordpress?
- Staggering featured post using ‘sticky’
- WordPress deletes custom posts instead of trash them
- Run Jquery Script after delete post in front end
- Trash a post, send associated comments into the trash bin (change status)
- Different style for first two (sticky) posts
- wp_trash_post not firing as expected (also applies to trashed_post)
- Why ignore_sticky_posts argument is in sticky post query?
- How to prevent users from permanently deleting a post from trash, but allow them to restore it?