Styling Different Posts in Different Ways With Post_Class

With WordPress 2.7 came the post_class function. This gives a set of CSS classes to a post, depending on what’s in the post (e.g. based on what category it is in).
The code that you use in your template to use this is simply like this:

1
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

While this is a fantastic [...]

Click to Read