ifacethoughts

Styling Using Categories In WordPress

Lorelle’s two month party is on, and this month it is about WordPress. I have used a nifty technique to use WordPress category slugs to use different styles for posts in different categories. It not only keeps the HTML code clean, but also helps in making it scalable without performance loss. Feel free to modify or add to it, after all its all WordPress goodness.

Discussion [Participate or Link]

  1. Rohit said:

    I wanted to style posts based on category but even I felt that using if-else blocks would have a hit on the performance. But this technique is simple beautiful! Thanks for sharing it. :)

Say your thought!

Who are you?

If you want to use HTML you can use these tags: <a>, <em>, <strong>, <abbr>, <code>, <blockquote>. Closing the tags will be appreciated as this site uses valid XHTML.

This is the weblog of Abhijit Nadgouda where he writes down his thoughts on software development and related topics. You are invited to subscribe to the feed to stay updated or check out more subscription options. Or you can choose to browse by one of the topics.