• I am trying to get “Widget Logic” to display widgets on specific “Event Calendar” categories.

    I have a handful of music categories set up using the Event Calendar. My intention is to have a widget display on only the “hip hop” or “rock” post pages, etc. I am a novice to coding but I understand through the Widget Logic information page that I need to get some conditional variables set properly.

    The example they gave that I have been trying to use is:
    is_category(array(5,9,10,11)) — category page of one of the given category IDs

    I found a list of classes that I thought I would need from Event Calendar here:
    https://docs.tri.be/Events-Calendar/index.html

    Can someone assist me with the proper code to insert into Widget Logic to allow the widget to display per Event Calendar category?

    I think you sincerely for your time and assistance.

    https://www.ads-software.com/plugins/widget-logic/

Viewing 4 replies - 1 through 4 (of 4 total)
  • if post pages = your single post, Maybe you can try this logic ??

    is_category(array(5,9,10,11)) || (is_single() && in_category(array(5,9,10,11))

    sorry, edited typo: missing ‘)’ at end of logic

    is_category(array(5,9,10,11)) || (is_single() && in_category(array(5,9,10,11)))

    5,9,10,11 are example of your category ID

    I had to look into this too and thought I’d share what I found worked for me to have widgets show up on the list pages of specific events calendar categories:
    `is_tax(TribeEvents::TAXONOMY, ‘my-event-category-slug’)

    But now I’m trying to figure out how to use widget logic to differentiate the past events in a category from the upcoming. If anyone knows how to do that please do tell. (Ex: I put a “view past events” button on a category list page and now I want to switch it out for a “view upcoming events” on the category past event list.)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Widget Logic to display on "Event Calendar" plugin per specific event category’ is closed to new replies.