I am looking for a way to do some conditional logic on terms associated with a post.
Essentially I created my own custom taxonomy for "age groups" and have created three terms for them. Kids, Teens, Adults... In the admin area I want to check the terms which apply to a specific post and on the frontend of the site within my page template I want to show a specific image if the term was associated with the post or a different one if the term was not associated.
Does anyone have a solution for this... I thought the following code example would work but it does not. (BTW - what I am doing here is changing the image based off css).
<li id="kids-<?php if ( is_term( 'Kids' , 'age_groups' ) ) {
echo 'on';
} else {echo 'off';} ?>">Kids Programs</li>