Conditionally show end time?

Home Forums Calendar Products Events Calendar PRO Conditionally show end time?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1458200
    cybarlow
    Participant

    I’ve reviewed the code snippet offered here: https://theeventscalendar.com/knowledgebase/remove-end-time-for-events/

    I’m wondering if there’s a way to alter this (or somewhere else in the templates) to show the end time only for events in specific categories (ideally, events that are in child categories of a single parent category).

    That is for events whose categories are under Parent Category 1, don’t show the end time. For events whose categories are under Parent Category 2, show the end time.

    Thanks.

    #1463868
    Jennifer
    Keymaster

    Hello,

    I’m sorry about the delayed response, our forums have been a bit busier than usual lately!

    You can add a condition to check the category. The tribe_event_in_category function will check if an event is in a certain category, but it will not return true if you are checking the parent category of an event that has a child category of that parent.

    To use the parent category, you would need to first get the child categories and then check against those before hiding the end date.

    We are a bit limited in the amount of support that we can provide for customizations, but if you get stuck or have any questions, please let me know!

    Thanks,

    Jennifer

    #1484061
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Conditionally show end time?’ is closed to new replies.