At the moment, when an event expires, the event’s listing on the calendar no longer contains any of the event’s category classes.
In order to cope with the limitation of not being able to specify multiple categories for a calendar, we use CSS to hide certain categories of events using the category classes.
However, for expired events, which we’d like to keep displayed, those classes are gone.
Any chance of keeping those in future? If not, is there a hook I can use to turn them on?
Because a calendar can only be filtered by a single category, we’ve created a complex category structure.
For example, there’s a category for a particular type of course that we run.
But then, in order to show only the courses of that type being run in a particular province, we use the Province category as CSS-based filter (don’t show all the other provinces).
The filtering works fine because Active events have all their categories as CSS classes.
With Expired events, unfortunately, all those classes are gone, so we have no way to filter categories we don’t want.
We would really like to show Expired events, so I’m hoping there’s a way for me to turn on those category classes using a hook…
There’s no hook to re-enable those classes, however we have a ticket to continue to include the classes when the event is expired rather than replacing them all with just ‘expired’.
The code for this is currently under review and will be tested before being included within the next version of the Calendar add-on (if no issues are found).
The support post ‘Keep category classes for expired events in calendar?’ 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.