Posted: September 26, 2019 at 7:22 am
I have 6 different tickets for an event. I see that tickets have unique ID’s; something I can target. But those ID’s don’t seem to come through the front end in the table body classes. Only a sanitized slug of the ticket name. Is there anyway to group them or have the unique ID’s come through so I can do what I’m trying to do? A better way, perhaps? |
|
Hi, There’s actually a built-in “Filter by date” feature that does something similar. When it’s activated it adds additional data to the ticket selector’s markup. Also, you could check its code and use it as a starting point. The feature can be activated by going to Event Espresso > Events > Templates, then set: Show Date & Time Filter? → Maybe show date & time filter Date & Time Filter Threshold → 2 Date & Time Filter Max Checked → 1 Here’s a link to the source JS: |
|
September 27, 2019 at 12:25 pm Thanks. Even though 3 are 3-day and 3 are 2-day, all start on the same date so the filter, no matter which is checked, still shows all. Is there a similar filter that can filter by another method? Perhaps some sort of taxonomy I could create? |
|
Tickets aren’t custom post types and do not have taxonomies. Have you considered targeting the sanitized slug of each ticket’s name? If each ticket’s name is unique that should work. |
|
Getting closer. Ideally, I’d like to replace the actual date ranges in the filter to my custom label choices. |
|
It’d probably be better to build out your own filter, which could be similar to the built-in one. |
|
Ok. Can I deregister yours and plop my own into our theme? |
|
You go to Event Espresso > Events > Templates, then set: Show Date & Time Filter? to “Do not show date & time filter”. |
|
The support post ‘Unique Ticket ID's?’ 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.