• Hi all, I wondered if anyone can shed some light on a small issue I’m having.

    I’ve got an events page (which just loads posts in 3 different events categories).

    I’m using some conditional statements to control some small graphics that display based on what type of event it is. My questions is, can I use ‘in_category’ to do something only if the particular post is in 2 categories?

    For example:

    <?php
    	if ( in_category( 'new events' AND 'old events' )) {?>

    So if the post is in the ‘New Events’ AND ‘Old Events’ cats, then do something…

    Any thoughts most appreciated!

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Changing style if post is in category 1 AND category 2’ is closed to new replies.