I have custom post type called events it has event_type taxonomy with two terms namely past-events, upcoming-events. I want to check my single post's term whether it's under past-events or upcoming-events Based on that i can display message. Thank you All
1 Answer
If I understand you correctly, then has_term
should be solution for your problem...
if ( has_term( 'past-events', 'event_type' ) ) {
// do something
}