2013-12-17_1025

This code is copy and past in your template file.

<div>
<h2>recent posts</h2>
<ul>
<?php if (have_posts()) : ?>
<?php query_posts(“showposts=7″); ?>
<?php while (have_posts()) : the_post(); ?>
<li>
<a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a>
</li>
<?php endwhile; ?>
<?php endif; ?>
</ul>
</div>

Advertisements