I am trying to add a different sidebar element for EE events based on the category the event is tagged with. get_post_type() == ‘espresso_events’ works to display the sidebar on all single event pages, but get_post_type() == ‘espresso_events’ && is_category(‘shows’) does not display the sidebar on single events tagged with the Show category. How can I get this to work?
It turns out that is_category() checks for if it’s a regular WordPress category archive page. When you check for a category or a custom taxonomy like espresso_event_category on a post, you can use has_term().
The support post ‘Widget Logic for EE event in specific category’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.