Title: How does the show_all_future_posts function work?
Last modified: August 30, 2016

---

# How does the show_all_future_posts function work?

 *  [Prairieopolis](https://wordpress.org/support/users/prairieopolis/)
 * (@prairieopolis)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/how-does-the-show_all_future_posts-function-work/)
 * I’m posting this hoping to learn a bit about filters and $wp_query.
 * This thread – [https://wordpress.org/support/topic/display-posts-with-future-status?replies=6](https://wordpress.org/support/topic/display-posts-with-future-status?replies=6)–
   has a filter function that works really well – it enables you to display single
   future posts! Yay! But I’m trying to understand _why_ the filter works.
 * This snippet in particular:
 * `$wp_query->post_count == 0`.
 * Why would the post count need to be 0? It seems to me that on a single page, 
   the post count would be 1?
 * This is clearly not an emergency, but if anyone could explain why that filter
   ends up showing posts with the future publish status, I’d be grateful!

Viewing 1 replies (of 1 total)

 *  Thread Starter [Prairieopolis](https://wordpress.org/support/users/prairieopolis/)
 * (@prairieopolis)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/how-does-the-show_all_future_posts-function-work/#post-6520281)
 * Here’s a guess:
 * Is _$wp\_query->post\_count_ automatically 0 when the query returns a post with
   the future published status? Because future posts don’t appear in the post count?

Viewing 1 replies (of 1 total)

The topic ‘How does the show_all_future_posts function work?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Prairieopolis](https://wordpress.org/support/users/prairieopolis/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/how-does-the-show_all_future_posts-function-work/#post-6520281)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
