If Statement with Categories
-
How can I create an if statement to be used to determine if an event post is part of the category “plays”?
I have found this… and have tried playing with but either it does not work like this or I have not found the right syntax.
$osd = array(tribe_get_event_categories($event->ID, array( 'echo' => false, 'label' => '', 'label_before' => '', 'label_after' => '', 'wrap_before' => '', 'wrap_after' => '', ))); if (in_array('plays', $osd)) : // output text else : // other text endif ?>
Any help will be appreciated.
Thank you
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘If Statement with Categories’ is closed to new replies.