Support

Home Forums Event Espresso Premium ESPRESSO_EVENTS_TABLE_TEMPLATE Ignores show_expired

ESPRESSO_EVENTS_TABLE_TEMPLATE Ignores show_expired

Posted: October 25, 2017 at 5:16 pm

Viewing 6 reply threads


Meet Me In The Cloud

October 25, 2017 at 5:16 pm

We have show_expired set to false here: https://meetmeinthecloud.com/online-learning/
But it’s still showing all the dates, even the ones that have passed.

I’ve tried reverting to a built-in theme and the problem persists. We are using a custom template file and the ‘false’ value for show_expired is coming through fine there, and getting sent to get_datetimes_for_event_ordered_by_start_time.


Tony

  • Support Staff

October 26, 2017 at 1:53 am

Hi there,

If you the default template does the same happen?

If you are using a custom template I’m assuming you copied the template to your theme’s root directory? If so you can rename that template (add -temp on the end) so that EE loads the default.

If you using the template_file attribute instead, just try using [ESPRESSO_EVENTS_TABLE_TEMPLATE show_expired=false]

Does it work for you then?


Meet Me In The Cloud

October 26, 2017 at 1:31 pm

– Using default template – same thing happens
– The custom template is in uploads/espresso/templates folder, I did change that template file to -temp though and now the page is blank – nothing shows up.
– Removing the template_file attribute from the shortcode and I still see the same problem, though.


Josh

  • Support Staff

October 27, 2017 at 9:23 am

Can you post the contents of your custom template to a pastebin or gist so we can investigate further?


Meet Me In The Cloud

October 27, 2017 at 9:55 am

https://pastebin.com/k9yQchcv


Josh

  • Support Staff

October 27, 2017 at 1:03 pm

What may be happening is a string ("false") is getting passed in for false(which should be a boolean). You should be able to avoid this by either removing the show_expired parameter from the shortcode
(i.e. [ESPRESSO_EVENTS_TABLE_TEMPLATE])

or change line 107 of your template to be:

$datetimes = EEM_Datetime::instance()->get_datetimes_for_event_ordered_by_start_time( $post->ID, false, false, $datetime_limit );


Meet Me In The Cloud

October 27, 2017 at 2:35 pm

That was it! Thank you!

Viewing 6 reply threads

The support post ‘ESPRESSO_EVENTS_TABLE_TEMPLATE Ignores show_expired’ 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