Skip to content

Instantly share code, notes, and snippets.

@Narga
Created June 7, 2012 02:07
Show Gist options
  • Save Narga/2886081 to your computer and use it in GitHub Desktop.
Save Narga/2886081 to your computer and use it in GitHub Desktop.
Wordpress - List most recent posts
<?php query_posts('showposts=5'); ?>
<ul>
<?php while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
<?php endwhile;?>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment