WordPress.org

Forums

Styling Posts in a particular Category (2 posts)

  1. pcmt
    Member
    Posted 4 years ago #

    I'd like to add a style rule in the header for Posts in a particular category. Is there a way to test for / detect the Category of a Post in header.php?

    I don't want to style the Category - just Posts within it.

  2. alchymyth
    Forum Moderator
    Posted 4 years ago #

    conditional template tags
    http://codex.wordpress.org/Conditional_Tags

    in_category()
    http://codex.wordpress.org/Conditional_Tags#A_Category_Page

    maybe in connection with is_single()

Topic Closed

This topic has been closed to new replies.

About this Topic