Support

Home Forums Events Calendar Add-on Keep category classes for expired events in calendar?

Keep category classes for expired events in calendar?

Posted: February 21, 2017 at 4:48 pm

Viewing 4 reply threads


Linda Isarasakdi

February 21, 2017 at 4:48 pm

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?

Thanks!


Garth

  • Support Staff

February 22, 2017 at 9:00 am

Hi Linda,

How are you today?

I need to better understand what you’re doing.

So the default calendar will show all categories, right? Then users can filter the view of results by category. You can also show the expired events or not. https://eventespresso.com/wiki/events-calendar-add-on/#ee4usage

Are you using a category specific and status specific calendar shortcode like this?

[ESPRESSO_CALENDAR event_category_id=your_category_id show_expired=true]

But then you want to add more categories to that category specific calendar? Then again, the general calendar will show all categories.


Linda Isarasakdi

February 24, 2017 at 11:04 am

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…


Tony

  • Support Staff

February 24, 2017 at 12:09 pm

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).


Linda Isarasakdi

February 24, 2017 at 1:24 pm

Here’s to “no issues” 🙂 Thanks so much Tony!

Viewing 4 reply threads

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.

Event Espresso