how to list posts by category in wordpress code example
Example: Get wordpress posts by category name..!
<?php query_posts('category_name=CATEGORYNAME&showposts=5');
while (have_posts()) : the_post(); ?>
the_title(); // To display the title of all posts that have category name selected
the_content(); // To display the content of all posts that have category name selected
<?php endwhile; ?>