You can use get_post_status()
within a query to get future
posts.
<?php
$args = array( 'post_status' => 'future' );
$my_query = new WP_Query( $args );
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<!-- Do stuff... -->
<?php endwhile; ?>
Related Posts:
- If click on Save/Publish change Post Status to Pending Review instead Publish
- revision id is one number behind – publish_post
- How to check if a user exists by a given id
- Get list of years when posts have been published
- Redeclare a function in a child theme
- Is it possible to remove the “standard” post format?
- Do WordPress’ cron’s clean up expired transients?
- How to add first name & last name to default registration form?
- Masking logout URL
- How can I programmatically create “child” pages on theme activation?
- Add admin bar link to edit author
- Warning/Notice about functions.php
- How to include one class/instance without using global variables
- Modify search function in WordPress (TwentyTwelve)
- Show/hide Widgets in Dashboard Based on Current Advanced Custom Fields Option
- Is checking whether the blog is installed necessary?
- How to Acheive the custom woocommerce category template
- How to add CSS style sheet dynamically in wordpress
- How to update BuddyPress xprofile fields programmatically? [closed]
- Replace Archive Widget Link Text
- A snippet after every image
- Programmatically set page template based on page ID
- How can I add an image field to BuddyPress Extended Profile Fields? [closed]
- wp_remote_post with ssl:// protocol
- Searching for content post
- Using separate .php file for functions – how to run on site?
- How to include local menu based on page id?
- How to add custom fields to my custom registration form
- Add Featured image column into wordpress admin on pages AND posts
- How can I change the do_action function in footer (copyright area)
- How to display post content instead of excerpt
- Access Plugin data from Functions.php
- Override a theme function in a child theme?
- changing behaviour of get_search_form
- how to call a function only in specific pages and exclude it from other pages
- Which action does wp_update_user triggers?
- Include default functions and methods
- Use register_setting() in a loop
- Dynamic dropdown from database table
- Add dynamic links in WordPress custom theme
- WordPress website Rs changed to currency symbol
- Functions in custom theme
- Please Explain the Importing Process of Multiple Stylesheets for Child Themes
- Attempt to change jQuery version caused White Screen of Death
- check if author has published posts in custom post type, then send mail
- paginate_links() don’t properly work in search.php?
- Difference b/w Simple function call & do_action call
- What’s wrong with my use of plugin_url()?
- Filter yoast canonical add_action priority [closed]
- Should I store functions in separate folder?
- How can I modify the element on all pages?
- AMP – Change rel=”canonical” from functions.php [closed]
- the_password_form functions not working together
- Function filter breaking tag archive menus
- How to echo the value of an array element using a function via a shortcode
- PHP 7.1 | Warning: A non-numeric value encountered in
- Way to redirect all Product Sub Category to its Main category Page?
- Convert multiple logos into the_custom_logo
- I can’t add CSS with functions.php
- Fatal error: Call to undefined function is_even()
- Register_Sidebar overwriting itself and doesn’t exist in global $wp_registered_sidebars;
- widgets not working
- search form leads to 404
- wp_get_archives() output
- hook for dashboard show_user_profile
- How to hide WooCommerce product title and short description to non logged in users?
- How to loop while adding data to database?
- Prevent wp_signon redirect on failed login for ajax login
- localize_script but data changes dependent on product ID
- Can we have conditional CSS styling?
- Change function without filter hook
- is_email gives me error
- only update titles of single posts
- Post content overflows on my mobile phone
- OOP Switch statement with array as parameter
- Using AJAX on frontend: Synchronous XMLHttpRequest deprecation except for admin role
- how can I change the read more link destinations and direct all to the same page?
- Woocommerce custom calculation function
- button to toggle css styling / div visibility?
- How to build two WordPress site using two different themes with same database (No ! I am not taking about multisite network)?
- How can I stop the hook from breaking the login/logout function?
- Pagination won’t work on custom page
- Does WordPress function replace_hello() exists?
- Using wp_localize_script in template file – is it secure?
- us states dropdown function and echo in theme template files
- Nothing happends on post_update
- Expanding a function to call a plugin or show a link
- Getting error while trying to use custom comment function
- Load WP Admin scripts in a child theme functions file
- add_role menu pages are not visible
- Trying to the deduce shortcode from a function
- How accomplish modification the_content if home/start page?
- Site is not updating because something is wrong with custom code. How to fix it?
- Changes doesn’t show up on blog
- Adding pagination to custom WordPress function
- Remove theme, change theme button and WP version on “Right Now” admin dashboard?
- Making an under maintenance page (without using plugins)
- Image width issue in IE [closed]
- Changed functions.php file and now site is blank [closed]
- How to add more than one menu for logged in members?