• Resolved darkartist69

    (@darkartist69)


    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)
  • Hey @darkartist69,

    Thanks for posting, & I’m happy to help.:)

    Unfortunately, this kind of request would require some customization that we can’t provide on these forums. However, we do have some resources for guidance doing that here. If you need to find someone to help with the customizations, we also have some tips for finding help here.

    Hope this helps, and thanks for understanding!

    Best,

    Shelby ??

    Plugin Contributor Victor Zarranz

    (@vicskf)

    Hey there! This thread has been inactive for a while so we’re going to go ahead and mark it Resolved. Please feel free to open a new thread if any other questions come up and we’d be happy to help. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘If Statement with Categories’ is closed to new replies.