Hi,
I only want to return the latest 2 posts but my code returns all the posts, any idea how I can fix this?
Code below,
Thanks,
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; ?>