Support

Home Forums Event Espresso Premium Expired Events Still Showing

Expired Events Still Showing

Posted: April 15, 2021 at 5:17 pm

Viewing 10 reply threads


Jason Lee

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:

[ESPRESSO_EVENTS_TABLE_TEMPLATE show_expired=false order_by=start_date sort=ASC category_slug=displaynow reg_button_text='Register Now' sold_out_button_text='Event Full' show_venues=false table_search=false table_paging=false]

What I’d like to do is either:
1. As soon as registration closes, have the event come off the list.
or
2. Have it show “registration closed” or something like that.

Right now it’s still showing with a register now option and then when you click to the event, it shows expired.


Tony

  • Support Staff

April 16, 2021 at 4:14 am

HI Jason,

If I understand correctly, we have a snippet that can do this for you:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/templates/de_ee_filter_events_out_with_expired_tickets.php

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/


Jason Lee

April 20, 2021 at 5:36 pm

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?


Jason Lee

April 20, 2021 at 5:53 pm

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.


Tony

  • Support Staff

April 21, 2021 at 4:19 am

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?

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.

Right now Event Full works great, but “Register Now” is still the text on events that are closed for registering.

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?


Jason Lee

April 21, 2021 at 9:34 am

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.


Jason Lee

April 27, 2021 at 8:35 am

This reply has been marked as private.


Tony

  • Support Staff

April 29, 2021 at 7:54 am

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)


Jason Lee

April 29, 2021 at 10:06 am

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,
– We used the Events Calendar Table template for some of our smaller events list, which was super clean (loved the little calendar date icons). Having that for EE4 would be pretty awesome for an out-of-the-box option.
https://eventespresso.com/product/espresso-template-calendar-table/

– 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:

https://imgur.com/a/E1VLrH2

(I looked for a desktop screenshot, but can’t find one for the life of me)


Jason Lee

April 29, 2021 at 10:10 am

Here is the screenshot link (had to delete a bit of sensitive info from the first)
https://imgur.com/a/ysTRQo0


Jason Lee

May 13, 2021 at 2:13 pm

This reply has been marked as private.
Viewing 10 reply threads

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.

Event Espresso