Hello everyone! My friend Alex Mathers asked that I let you know about his latest eBook ‘ Read the rest of this entry »
Posts Tagged Alex

WordPress 2.7 came with 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 function for changing a post’s display, the classes that it outputs are actually quite limited. Luckily, we can add our own, and we can also add our own dynamic classes.

