At WP Admin -> Posts -> Categories, if you point the mouse at the title of a category you'll see a URL ending on "...action=edit&cat_ID=XX" in the status bar at the bottom of the browser viewport. XX is the ID of that category.
The PHP code I posted above should wrap a link to the first category of a post into a <span> element with a CSS class (i.e. "13") which equals the (Wordpress) ID (i.e. "13") of that first category.
<span class="13"><a href="link-to-category">Category Title</a></span>
You could then style each one of these <span> elements with a CSS Insert. The example above would cover 3 example categories, with the ID's 12, 19 and 25.
BTW, the images in the CSS example don't have to include the category ID in their file name. I just made the example that way.
Last edited by Flynn; Jul 16, 2009 at 07:57 PM.
|