Support

Home Forums Event Espresso Premium Hide "register" button on past events in Event Listings?

Hide "register" button on past events in Event Listings?

Posted: February 4, 2013 at 2:32 pm


Colman Knight

February 4, 2013 at 2:32 pm

Hello! I’ve figured out how to use shortcodes to display the list of events I want, by date, including past events. But, what I’d like is, on those events that are past/expired, to hide the “register” button, and ideally, hide the number of available spots as well. Is this possible? Here’s a link to my current testing page where I’m working on this – there is one event currently that is past – the first one: http://colmanknight.com/ck-events-2/


Jonathan Wilson

February 4, 2013 at 3:04 pm

Hello Colman,

The easiest thing to do would be to enter the show_expired=false parameter in the [EVENT_LIST] shortcode, like this: [EVENT_LIST show_expired=false.]


Colman Knight

February 4, 2013 at 4:03 pm

Thanks, Jonathan – but, actually, I do want the past events to show. I just want it to be clear from that Events List page that they’re past, and therefore no one can register. As it is now, if they didn’t notice the date, someone would need to click on the Register button to see that the event is closed.

I’ve looked into breaking up the list into two – the first that shows Past Events, just with titles & dates, and the other with active/upcoming events – but searching through the forums it seems like this isn’t possible at this time. So, I think I’ll need to manually create (and update) the page each time an event expires.


Dean

February 5, 2013 at 2:20 am

Hi Colman,

Depending on how you are setting it up (I couldnt see the page you had) it’s theoretically possible, but you would need to use PHP to do it.

I would probably do something like a check against the event end date and the current date and if the event end date is before today dont show the link, and if its today or later show the link.

The support post ‘Hide "register" button on past events in Event Listings?’ 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