Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

The code I am currently using in the loop is in this code snippet: https://gist.github.com/1316622

This just seems messy, and long.

I am thinking the best method would really be to use CSS sprites and the post class, but for some reason I cannot put my brain around how to do this.

I created another gist of the output of my WP loop, so you can see the post format is added to the class of the article. Not sure if that is the easiest method to address this, and am appreciative of any help: https://gist.github.com/1316633

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Using CSS and image sprites is exactly what I do in Oenology. (See it in action here.)

Mine is a bit tricky, because I change the post container based on post-format type (some have post headers/titles, others don't; some have left/right margins added; etc. - also, I have dark and light icon sets, based on the color scheme selected). But, here's my code for dynamically generating the CSS (lines 418-598).

share|improve this answer
    
Perfect! Thanks Chip. I have always been a fan of your coding technique. –  Rachel Baker Oct 26 '11 at 15:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.