Posted: October 3, 2017 at 12:01 pm
|
Hi there, I am using EE 3.1.35.1.P and have modified the custom “Events Table” template to display a list of events filtered by category. This is working well, however it is showing events that are sold out. Is there a way to filter out events that are full with this version of EE? It’s possible that the version I’m on isn’t able to do this as I noticed in the code there is a comment about needing version 3.1.37 to enable the filter_hook_espresso_get_num_available_spaces hook. Would upgrading to 3.1.37 help? FYI I found this answer on the forum – it looks like this is possible in EE4 using the general settings but upgrading isn’t an option at this point. https://eventespresso.com/topic/sold-out-past-events-how-do-you-hide-them/ |
Hi Melody, Yes this is likely possible by making more edits to your modified template. May I ask what is the file name of the template that’s modified? The reason I ask is because there is more than one table template for EE3. Also, it will be best if you can update your site to the current version of EE3 because you’ll have a more reliable codebase to work with, and your site will have the security fixes that were added since 3.1.35. |
|
|
Hi Josh, thanks for your reply. To answer your question the file name of the template that’s modified is “plugins/custom-templates/templates/events-table/template.php” Does that help? |
|
Here’s my code: redacted – Event Espresso support team – LOC |
Can you post the code to a pastebin or gist? The support forums aren’t intended to be used for development help, but if you can post the code in a pastebin or gist, then link here, we can take a look at the code and we’ll go from there. |
|
|
Sure, here ya go |
OK thank you. On line 49 you have this:
After that line of code you can add: and that will remove sold out events from the display. |
|
|
That worked perfectly! Thank you Josh! |
The support post ‘HIde "sold out" events in EE3’ 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.