最新の 2 つの投稿のみを返したいのですが、私のコードはすべての投稿を返します。これを修正する方法はありますか?
以下のコード、
ありがとう、
R.
<?php
$postslist = query_posts('posts_per_page=2');
foreach ($postslist as $post) :
setup_postdata($post);
?>
<div class="post">
<?php the_date('d/m/y', '<div class="date">', '</div>'); ?>
<?php the_title('<div class="title">', '</div>'); ?>
<?php the_excerpt(); ?>
<?php echo '<a class="readmore" href="'. get_permalink() . '">' . __( 'Read More <span class="meta-nav">»</span>', 'twentyten' ) . '</a>';?>
</div>
<?php endforeach; ?>