Display Recent Posts From A Specific Category In WordPress

The snipped below shows you how to display recent posts from a specific category in WordPress.

Where it says “showposts=5” change the number to how many posts you want to display, and “cat=4” is the id of the category, just change the ID of the category to pick which category will you want to display.

You can of course add the_permlink() or any other standard post feature you are planning to display!

<?php query_posts('cat=4&showposts=5'); ?>
   <?php while (have_posts()) : the_post(); ?>
      <?php the_title(); ?>
   <?php endwhile; ?>
<?php wp_reset_query(); ?>