Support

Home Forums Event Espresso Premium Event Filtering

Event Filtering

Posted: June 16, 2017 at 12:30 am


lupineart

June 16, 2017 at 12:30 am

Hi guys,

Just revisiting:

https://eventespresso.com/topic/event-filtering-2/#post-242574

It turns out that having a fixed date of not showing up in my events list won’t be suitable. I can’t use a ‘show in list’ category, as I use categories already on my pages and understand that you can only use 1 category in the shortcode.

Is there any other work around?

I run a lot of 6 week classes, so when we get 1/2 way through, all of the upcoming classes I’m trying to sell are buried in the event list of the ongoing classes.

If the best solution is for the filtering described in: https://eventespresso.com/topic/event-filtering-2/#post-242574

… will the events still be shown in the calendar with that in place?

I’d like all events to remain in calendar, I just want to filter out some of the others in the event list that have already started.

Maybe instead of a time frame, we can have it not show if there are no more tickets available? That way I can control with ticket availability.

Thanks, Derek


Tony

  • Support Staff

June 16, 2017 at 5:30 am

Hi there,

Did you try the function that Josh linked to in the other thread to see if it will work for you?

That function filters the events to only show events where the ‘Event Start’ is greater than {now}. So in other words the classes list will only show upcoming events rather than upcoming and active.

… will the events still be shown in the calendar with that in place?
I’d like all events to remain in calendar, I just want to filter out some of the others in the event list that have already started.

Yes, Joshes example only applies to a page called ‘classes’, that’s what this part of the code does:

if ( is_page( 'classes' ) ) {

I’d recommend adding that function to a Custom Functions Plugin and taking a look at your events to see if it will suit your needs, the plugin can then be de-activated if not.


lupineart

June 16, 2017 at 9:36 am

Hey Tony,

I didn’t try that yet because I’m looking for a little more flexibility than that. My problem is that I have some 6 week classes that I want to show until the very end (because we sell tickets for each datetime) and I want some 6 week classes to not show after about 1/2 way through (because the are intended to register only before the start date).

I don’t mind editing each event when I want them removed if that’s necessary, such as changing a category or some other setting.

As a workaround for now, I simply saved them to be assigned to no category, so they don’t show up. But I don’t think that’s a good long term solution, as the past events won’t be assigned to any categories…

I would think the best way to solve this is something to do with tickets, i.e. do not show if the tickets are no longer available. The catch – I want sold out events to still show… Can we tie the showing of events to the last day any tickets are/were for sale?

What do you think?

Thanks, Derek


Josh

  • Support Staff

June 19, 2017 at 2:48 pm

Hi Derek,

That’s exactly what this snippet does:

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


lupineart

June 20, 2017 at 10:42 am

Thanks, Josh. Just to be clear, the events that are sold out will still show up as ‘sold out’ with this?


lupineart

June 20, 2017 at 11:16 am

Hi Josh – I ran this and tested it, it appears to do what I want so far.

Thanks for your help on it.


Josh

  • Support Staff

June 20, 2017 at 11:21 am

Yes they will, up until the date that they’re scheduled to not be available to sell anymore. So to be super clear, if the event sells out before the Sell Until date, it will still show. Then the day after the Sell Until date for the tickets, then the event will not be included in the list.


lupineart

June 20, 2017 at 11:27 am

This is perfect, thanks Josh.


lupineart

June 20, 2017 at 11:58 am

Hi Josh – almost perfect… I changed the # of tickets available to 0 for testing to see that it showed up how I wanted. It did, that’s fine. But then I put the number of tickets available back and it’s still showing as sold out.

https://lupineart.com/mixed-media/

for this class: https://lupineart.com/events/portaits-of-absurdity/

https://www.dropbox.com/s/apviuc1yuhgvedv/Screenshot%202017-06-20%2010.57.42.png?dl=0

You can see it’s not sold out. I’ve tried in another browser also.

Thanks


lupineart

June 20, 2017 at 1:09 pm

This seemed to be resolved, I don’t know how. It’s not showing as sold out.

Thanks, Derek


Josh

  • Support Staff

June 20, 2017 at 1:35 pm

There’s a one minute page cache for the Ticket Selector shortcode Derek.

The support post ‘Event Filtering’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 1 year, 12 months ago ago

Topic Tags

Tagged: 

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!