Monday, May 3, 2010

Get 5 new posts for my homepage Wordpress

you could just paste this into your template:

<div class="recent-five-posts">

<?php query_posts("orderby=desc&showposts=5"); ?>


<?php while (have_posts()) : the_post(); ?>


<div class="individual-posts">

<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Read More</a></h3>

<?php the_excerpt(); ?>

</div>


<?php endwhile; ?>

</div>

No comments:

Post a Comment