Created
January 3, 2017 13:43
-
-
Save ontiuk/b6b51d2ffc70970eae3cb9a305a1786c to your computer and use it in GitHub Desktop.
WordPress Scheduled Posts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Set future post status | |
$args = array( | |
'post_type' => 'post', | |
'post_status' => 'future' | |
); | |
// Process Query | |
$scheduled = new WP_Query( $args ); | |
// Posts Loop | |
if ( $scheduled->have_posts() ) : | |
?> | |
<?php while( $scheduled->have_posts() ) : $scheduled->the_post() ?> | |
<!-- Post Content Here --> | |
<?php endwhile ?> | |
<?php else : ?> | |
<!-- Content If No Posts --> | |
<?php endif ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment