我有一个显示最近帖子的代码:
<?php
$args = array( \'numberposts\' => \'5\' );
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent ){
echo \'<h2><a href="\' . get_permalink($recent["ID"]) . \'">\' . $recent["post_title"].\'</a> </h2> \';
echo \'<p>\' . date_i18n(\'d F Y\', strtotime($recent[\'post_date\'])) .\'</p> \';
// what code here?
}
wp_reset_query();
?>
Thx:)