You can use this in a template file:
$tomr = getdate(time()+86400); //utc=gmt time in seconds, add 24 hours = 86400 seconds
$args = array(
'post_status' => 'future',
'date_query' => array(
array(
'year' => $tomr['year'],
'month' => $tomr['mon'],
'day' => $tomr['mday'],
'column' => 'post_date_gmt' //since we are using the gmt timestamp
),
),
);
$query = new WP_Query($args);
if($query->have_posts()) {
while($query->have_posts()) {
$query->the_post();
//display post data
}
//restore original post data if it's required after this loop
wp_reset_postdata();
} else {
//no posts found
}
Related Posts:
- Update post counts (published, draft, unattached) in admin interface
- How to Display a List of Users Who Have Made at Least 1 Post?
- Find out who deleted a page or post?
- WordPress: How to get the current logged in author page URL?
- disable password protected page for logged users
- Force “Submit to review” when a post is updated
- Overview with latest edited posts and pages
- Navigation link to specific user page
- Get how many days since last post of the current user
- Hide comments awaiting moderation from user who submitted the comments
- Query All users that has post
- Limit number of posts a user can make per minute?
- How do I allow users to follow a post and then allow admins to email all users who have followed that post?
- wp_insert_post let users post to without login…broke
- Get user’s most published categories
- Allow anonymous users to post to my site for moderation
- disable column on post and user list
- how to find user ids of all commenters in a post
- How to list users and their post amount?
- UberMenu list current user’s posts as menu items
- Create post for every user?
- count the total number of comments the user has received for his published posts
- Restrict users post for himself
- How to allow logged in users to post anonymously
- Allow public to post on blog
- current post with current author
- How to verify wp user password by sql query in wp? [closed]
- How can i delay reading posing in 3days for not logined user?
- Encountering “Wrong nonce. Action prohibitied.” when trying to alter User Role and unable to Post via WP Admin
- Users problem (multi-author plus multisite)
- How do I manage my users post before publish?
- How do I retrieve a users’ last 5 posts?
- Gather posts into a cart/lightbox and share with another user
- Assign published posts to another user automatically
- Add field to user meta table in database when link is clicked
- Hide comments and posts posted by other user
- Automatically create a default set of posts for each new registered user
- Summary of Posts by an User
- Display a list of users who have viewed the post you are viewing
- Check if current user has a post and that post has any term/s from a specific custom taxonomy outside the loop
- Echo Text If User Is Logged in But NOT the Author of post
- Deleted a user with administrator rights. Now all the data/content/images are lost. how to recover them back
- Show number of posts by logged in user
- Retrieve data from post meta meta_key having ‘_product_fq_image’ while having author_id and post type is PRODUCT
- Cannot select certain authors for posts after import
- How to limit post (Exception pages) for current user in each role in front end?
- How can get the last post date of the user?
- Is there a way to save different data when USER interacts with the same POST?
- How to display particular categorie’s post which associated to specific user?
- WordPress Delete Users from backend doesn’t work
- Allow users to post their videos to my wordpress website?
- Compare date of user’s last posts
- Add new post only in assigned category
- WordPress each user has each content for a page,how to do that?
- User rank in wordpress post
- Count how many posts a user has viewed
- Allow users to create their own page/s
- Get current user array with post string
- My posts section for logged in user
- Show Custom Post From Logged In Author
- Delete old post with new post
- How to handle dates, trying to calculate time since a post
- each user having category with their name and can add sub categories post in that category
- The post order is different for logged-in and non-logged-in users? [closed]
- User submitted post
- Automatically select category based on user role
- Undefined Function Fatal Error with Shortcode [closed]
- Change Posts per page count
- Restrict access to post if it is currently being edited
- Query only Posts from Both of Two Category?
- wp_update_term is always launched after wp_insert_term
- why does HTML Tag not working in Post and Page
- Posts are being redirected to xampp home page
- Sidebar links for different pages
- Blog page not working
- Words must be included and restricted words in new posts
- Pausing and Resuming WP_Query results
- Can’t get buddypress notifications in front-end; why do I get this error?
- How to disable WordPress blog folder
- Automatically add date to the auto generation of post slug
- Disable sticky option for specific categories
- Show only posts with images and a fixed amount of posts
- date issue with category post retrival
- Append ‘Continue Reading’ link if post length is more than 3 lines of text?
- How To Download WordPress Audio Attachments
- How to make blog posts have their own urls?
- How to view a post from the wordpress admin screen
- Is it possible to change the default WP post table’s data source?
- Multiple Pages – Seperate blogs
- Admin is showing all posts on page 1
- Show a Category Specific Info Box
- post content includes and seo vs. duplicate content
- Posts don’t appear on the Blog page
- Display the first post’s comments of category in comments.php template
- On the post list, how do you show different text to the main content?
- Need All the posts with id, title and date [closed]
- List posts related to category on a div [closed]
- How to get only post=’product’
- Show Next/Previous without Link
- Hindi content automatically converting to unreadable language?