可以在模板文件中使用:
$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
}