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
- Sticky Posts exceed posts per page limit
- why ignore_sticky_posts in sticky post query
- How do I programatically empty trash?
- Turn Off Automatic Trash Deletion?
- How to add “Stick this post to the front page” to front end?
- Code to make a post sticky
- WP_Query: Why is sticky post not first item in loop?
- Query *only* sticky posts
- Show all sticky posts, WITH pagination
- Sticky Posts & Posts Per Page [closed]
- Ensuring sticky posts are retrieved first (without using two queries)?
- Highlight a Featured Post?
- wp_delete_post() deletes post instead of moving it to trash
- 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?
- Does WP fire delete_post when trashed posts are automatically deleted?
- Limiting query_posts to 1, regardless of sticky post?
- How to make “sticky” pages (and query by them)
- How do I show sticky posts on a static front page that also contains content?
- Using categories & “stickyness” together
- Sticky posts on home page, search, tag and archives without plugin
- How to add/retrieve the post trash link?
- How to retrieve sticky post in raw sql?
- WordPress 3.1 – How does one add sticky post capabilities to post types
- trash_post action with Custom Post Type
- Trash bin for categories
- Disable sticky posts feature
- Apply styling only to first page sticky posts
- Include Sticky Post in Page Posts Count?
- Comments screen in backend, how to disable Quick Edit | Edit | History | Spam | for non admins
- wp_query for the first sticky, then display the rest of the posts excluding the first sticky
- Adding Sticky functionality to Custom Post Type Archives
- Schedule Sticky Posts
- How to make all posts in a category sticky?
- Display All Sticky Post Before Regular Post
- How can I hook into existing WordPress Bulk actions?
- Sticky Posts Not Sticking to Top of Category Archive
- All sticky posts are returned in custom query
- How to hook in to bulk trash posts
- Randomly placed sticky custom posts complemented by blog posts
- how to make custom posts sticky? [duplicate]
- WordPress has a trash for users? (Wrong result for count_user, greater than expected)
- Restrict access to the Trash folder in Posts
- Get sticky post from category?
- How to make all posts in a category “unsticky”?
- How to change redirect after moving a page to trash?
- “Sticky” posts for each category (archive.php)
- Error after deleting Custom Post Type with a function (no trash used)
- 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
- Add frontend “Restore” link
- Dynamically create/remove terms in taxonomy when custom post type is published/trashed
- Can I differentiate between “Delete Post Permanently” and “Empty Trash” and do something for each accordingly?
- How to add a column to the Trash page?
- Include Sticky Posts in Page Post Count for custom query
- Query sticky posts with thumbnails
- Custom Role can’t trash Custom Post Type
- How to remove sticky post capability for a specific user role?
- Can a user with admin role get ‘Sorry, you are not allowed to move this item to the Trash’ error when trashing a post?
- Why trash folder got empty automatically?
- How to use custom fields to enable sticky posts on custom post types?
- wp_trash_post not firing
- Restore trashed posts with comments