请使用日期查询,也请使用下面的代码,希望它能为您工作
$mil = 1532996880000;
$seconds = $mil / 1000;
$dt = date( "Y-m-d", $seconds );
$year = date( "Y", $seconds );
$month = date( "m", $seconds );
$day = date( "d", $seconds );
$args = array(
\'date_query\' => array(
array(
\'year\' => $year,
\'month\' => $month,
\'day\' =>$day,
),
),
);
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) {
echo \'<ul>\';
while ( $query->have_posts() ) {
$query->the_post();
echo \'<li>\' . get_the_title() . \'</li>\';
}
echo \'</ul>\';
/* Restore original Post Data */
wp_reset_postdata();
} else {
// no posts found
}