您可以这样做:
if ( have_posts() ) :
/* Queue the first post, that way we know
* which date we\'re dealing with.
*
* We reset this later so we can run the loop
* properly with a call to rewind_posts().
*/
the_post();
// receive the latest post timestamp
$latest_post_timestamp = strtotime( get_post()->post_date );
/* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
*/
rewind_posts();
// create our custom query and set our latest date arguments
$the_query = new WP_Query( array(
\'year\' => date( \'Y\', $latest_post_timestamp ),
\'monthnum\' => date( \'m\', $latest_post_timestamp ),
\'day\' => date( \'d\', $latest_post_timestamp ),
) );
// render our latest date posts
echo \'<ul>\';
while ( $the_query->have_posts() ) :
$the_query->the_post();
echo \'<li>\' . get_the_title() . \'</li>\';
endwhile;
echo \'</ul>\';
// Restore original query and post data
wp_reset_query();
wp_reset_postdata();
endif;