Showcase - Categories

One of the things I like most about WordPress is the ability to pretty much do anything you want with it. With the help of a plugin, or custom PHP code, you can accomplish most things. If you would like to display a list of recent posts from a specific category in your sidebar, follow the steps below:

Step #1
Download the PHP Code Widget created by Otto.

Step #2
Upload the plugin to the wp-content/plugins directory on your server and activate it from within the WordPress dashboard.

Step #3
Go to Appearance > Widgets screen in your WordPress dashboard and choose the PHP Code widget and place it into the appropriate widget area you wish to display the list.

Step #4
Copy the code below and paste it into the text box for the PHP Code widget.

<ul> <?php $recent = new WP_Query("cat=3&showposts=5"); while($recent->have_posts()) : $recent->the_post();?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul>

Notes
You can specify the category you wish to display in the sidebar by replacing the cat=3 with the category ID you want to display. If you want to add/reduce the number of posts shown, simply change the showposts=5 to any number. The plugin/code has been tested with WordPress 2.8 and was successful.

Screenshot
PHP Code Text Widget