Posted: April 15, 2021 at 5:17 pm
|
Hi! Making the switch from EE3 to EE4 finally (really pumped about some of the features). I am trying to make the expired events stop showing as soon as registration closes, but they are still showing up. Here is the code I am using:
What I’d like to do is either: Right now it’s still showing with a register now option and then when you click to the event, it shows expired. |
HI Jason, If I understand correctly, we have a snippet that can do this for you: That removes events from the EE event lists if all of the ‘sale end’ dates on the ticket within the event have expired. You can add that to a custom functions plugin on your site, we have some documentation on creating one here: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ |
|
|
Worked like a charm Tony, thanks! Do I need to worry about anything here when EE4 updates or is this good to go because it’s set up like a plug in? |
|
Also, last question, is there an option to just change the message that shows for “register now” when registration is closed if we decide we still want those events to show? Right now Event Full works great, but “Register Now” is still the text on events that are closed for registering. |
You don’t need to worry. Not specifically because it’s set up using a plugin (you can still do things a little oddly in plugins) but because it’s using a hook. The whole idea behind hooks is to allow you to ‘hook’ in and change something in the code, without actually changing the code itself, which means you can things like the above and it will persist between updates. The above applies as long as we don’t change how things work which then affects the hook etc but we are very much aware of that when we work on EE and try to avoid as much as possible.
We don’t currently have a check for all of the ‘sell until’ dates on the table view template to allow you to change the text when they are all expired. It would be possible to add to the template used for that output and I can add some details on how you can use a custom template if thats something you’d like to do? |
|
|
Thanks for taking the time to explain all of that, extremely helpful! And that would be awesome if you were able to provide some details on that. We actually had a custom template (you specifically put it together for us) for EE3 that was really awesome. It did that as well as looked really clean/flashy. I’d be more than happy to purchase some support tokens or whatever is needed to get something similar for EE4. It’s probably also something you could have as an add on for anyone to use. I still have the files from it or they’re probably in our support history somewhere. |
|
This reply has been marked as private. |
Hi Jason, Sorry for the delay, I got a little sidetracked getting the latest EE4 release out. Unfortunately, pretty much any code that is for EE3 doesn’t work with EE4 as it has been designed/built in a completely different way (better in the long run, but very different). I started checking into this and realised that it’s going to increase the queries on the event a little as we already have the events, but now need tickets based on their dates etc, nothing major but something to be aware of beforehand. As EE4 works differently I don’t want to ask if you just want it to work the same way as your old template but can you give some details on how you want to template to output the events? (Be that ‘normal’ events, events where ticket sales have all need but it is still an upcoming event, sold out events etc) |
|
|
No worries! Excited to hear a new release is on the way. To answer your question, the main difference was aesthetics and not so much functionality. The only difference in functionality is that when registration was closed (because of registration time ending or no tickets remaining), “Register Now” read “Closed”. We had people who would get excited seeing “Register Now” and then get upset when they say that wasn’t actually an option. (Events still stayed on until the actual day of the event concluded, which is still fine) As for the look differences, – And for our flagship event list (where we put our biggest/featured events), we had a modified version of that template that showed a featured image and looked really nice on mobile. I’ve got a screenshot from mobile attached here: (I looked for a desktop screenshot, but can’t find one for the life of me) |
|
Here is the screenshot link (had to delete a bit of sensitive info from the first) |
|
This reply has been marked as private. |
The support post ‘Expired Events Still Showing’ 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.