You need to add future posts to the query.
function add_future_posts($query) {
$query->set('post_status', array('publish', 'future'));
}
add_action('pre_get_posts', 'add_future_posts', 10, 1);
Related Posts:
- show image gallery in archives or category page
- custom sort posts in archive/taxanomy page
- Show posts by author of membership level (Paid Membership Pro)
- Inner join overrides Advanced Custom Fields plugin’s get_field [closed]
- meta_value timestamp older than now
- Every second post different class in blog view
- Loop doesn’t exclude the specified category in home page
- Get posts with multiple categories
- Do not show children of a category
- Display posts of specific category term
- Print out last 3 blogposts
- why the same code got different results when using query_posts in functions.php and index.php
- Query posts by Author and/or by Tag
- Query for first 3 posts to change the look and feel
- Custom Post Type archive
- How to get posts published on the latest date?
- Why posts array is empty?
- Can’t understand why sometimes a [caption] field appears
- Page and post loop same template
- Getting blog pagination to work on page set as front page
- How to group only VISIBLE posts? [closed]
- How to check in functions.php if there is data in a WP_Query?
- Shortcode with ‘year’ parameter
- search blog posts by author first name and or last name
- Show metabox value last post excerpt, title and link
- On what hook can I get the queried object’s final state?
- unique post in “$args” of wp_query display more than one post
- Display current post position in Elementor Posts widget
- Why in my query is display two title?
- Migrate posts from category and sub-category via SQL
- Does WP automatically tag posts into the archive?
- How do I insert a after every 5 posts in a WordPress Loop that infinitely loads posts?
- wp_query with ajax
- How to give classname to post if post has no content?
- Custom wp-query in wordpress rest api
- WP_Query: Show 10 posts in date order, first three random
- singular posts using archive styling
- How can I insert a new markup element after 4 posts automatically? [closed]
- Exclude some posts from displaying in wp_query based on some condition
- posts_per_page returning only one post
- If no posts exist for current day and month, show the next available day of posts
- WordPress Loop: How to display recent posts in multiple divs
- Random posts that always include a particular post?
- Need to know custom code to display random and most viewed posts in wordpress posts and pages
- Related Posts function not working
- How to retrieve certain number of images from a wordpress post?
- WordPress post filter menu
- How to display post list in a table layout (multiple queries in single loop)
- Conflict array_splice on loop and query in widget
- I want to show my post for limited time, how is it possible?
- Not all posts showing in query
- how to handle the loop using filling bootstrap grid structure?
- Get all custom posts with a certain taxonomy
- WP_Query custom field pass the post id
- How to convert query sql to shortcode in wordpress?
- Link to date_query results in WordPress
- wp_query if have posts show date but not in loop
- Use posts_where to exclude posts ids from wp_query
- Query function not executed between element [closed]
- Custom WP_Query not working correctly
- Echo the number of posts being displayed
- Exclude a category of posts in author template
- How to edit the ‘
- When WP_Query only returns 1 post, how do I automatically redirect to that post?
- WordPress query portfolio posts
- Post-Archive like a page in a specific subdirectory
- Current and next month posts
- WP_Query of Category Not Showing First Post
- Get latest author posts inside the loop
- Limiting post list by taxonomy
- Why does WordPress search returns same number of results for every search query?
- Creating a related posts section in wordpress inside a default post
- Same post appears in related Posts?
- Display in category ( taxonomy) a number of post that I want
- How to display WP Query filters?
- Finding a post’s slug
- Find out in which kind of archive am I
- Display 3 posts with different HTML markup using a loop
- Sidebar limiting to 10 posts?
- Change content off every sixth element
- adding my posts (author posts) in menu
- How to view all posts (on site, not admin) that are uncategorized?
- Archieve page, Advertisement Every 3 Posts
- Highlighting Current Category in the Archive and Feeds page
- Is there a function to get post info for any publish_status by post ID?
- How Can I Always Display A Particular Post First Using WP_Query?
- Optimal WP Web App Backend for mobile app development
- WP_Query get posts in custom database table [duplicate]
- WP query taxonomy optimization
- Override WordPress core post-template.php block template
- How to show multiple posts thumbnail, title and date in widget
- How do I display main query posts in random order using add_filter
- WP_Query outputs wrong post in custom post type
- WordPress Query – Display 5 posts (same post type), each from a given tag
- While loop in functions.php outputting the_title() of each post on frontpage
- how to show comments only author which send own posts in wordpress
- Group first, 2nd, 3rd, etc posts by category terms
- Manipulated offset and pagination, can’t display last post anymore
- Show posts from two specific category in WP_Query
- Why sorting posts doesn’t work properly?