• I’d like to target posts with CSS based on category or tag names. It would seem that I should be able to pass a variable to the Loop:
    <div class="post [variable goes here]" id="post-<?php the_ID(); ?>">
    I tried using the_category but you get both the category and the href. Any ideas on another solution?

    Thanks in advance for the help.

  • The topic ‘How to pass category or tag name to class=”post”’ is closed to new replies.