[insert_php]
$args = array( 'category' => 1,'numberposts' => '2', );
$recent_posts = wp_get_recent_posts($args);
foreach( $recent_posts as $recent ){
echo '<li><a href="' . get_permalink($recent["ID"]) . '">' . $recent["post_title"].'</a> </li> ';
}[/insert_php]
详细请看http://codex.wordpress.org/Function_Reference/wp_get_recent_posts