Support

Home Forums Event Espresso Premium How to list events when the start_date >= today ?

How to list events when the start_date >= today ?

Posted: September 14, 2015 at 4:37 am


Juan

September 14, 2015 at 4:37 am

I’m trying to list the events when the start_date is > = today with shortcodes.

[ESPRESSO_GRID_TEMPLATE order_by=”start_date” limit=”6″]

Can you let me know hoy to use the max_day or if is in any other way?

Thanks in advance.


Tony

  • Support Staff

September 14, 2015 at 5:17 am

Hi Juan,

The default output for the grid template should use start_date by default. Do you see expired events on yours?

Can you link us to the page so we can view the template please?

Can you let me know hoy to use the max_day or if is in any other way?

The max_day attribute is not currently support with the EE4 Grid Template, you can view the attributes available here:

https://eventespresso.com/wiki/events-grid-view-template-add-on/#ee4installation


Juan

September 14, 2015 at 10:30 am

Hi Tony,

the url is http://dev.tfpl.barracuda-digital.co.uk/course-calendar/grid-view/
as you can appreciate there is listing some events in which ones the start date is older than today and in our case we want to avoid people can subscribe to them.


Josh

  • Support Staff

September 15, 2015 at 8:29 am

Hi Juan,

The first step to making it not possible to register for these events is you set the ticket sale end date to yesterday (or the day that the event starts).

Then, to make them not display in the event list, you add the following code to your theme’s functions.php or into a custom snippets plugin.

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

The support post ‘How to list events when the start_date >= today ?’ 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