Support

Home Forums Event Espresso Premium How to display all datetimes for an event until the last datetime has passed

How to display all datetimes for an event until the last datetime has passed

Posted: August 30, 2021 at 11:00 am


infrasolutions

August 30, 2021 at 11:00 am

Hi,
When drilling down into an event (like a class) from the table view, how do I display all date/times for an event (even those that have passed) until the entire event (the last date/time) is complete?
Thanks, Frank


Tony

  • Support Staff

August 31, 2021 at 4:27 pm

Hi Frank,

It depends on the specific location you are viewing but as you mentioned the table view I assume you mean this add-on:

https://eventespresso.com/product/eea-events-table-view-template/

If so, you can set that add-on to output all of the datetimes for an event on the shortcode itself, like this:

[ESPRESSO_EVENTS_TABLE_TEMPLATE show_all_datetimes=true]

However, to set this up so that the datetimes continue to show after they are expired you would need to also the the show_expired=true parameter in the above, which will also cause expired events to continue to show in that table.

How comfortable with PHP/FTP are you?


infrasolutions

September 1, 2021 at 7:49 am

Thanks Tony, I will try that. I think we ultimately we want the date/times to show, while events (classes) that are complete fall off the list.

Good with PHP/FTP.


infrasolutions

September 1, 2021 at 7:54 am

Hey Tony, Updated the shortcode as suggested, and now the table actually shows each session, not the first datetime. See example here: https://elearn.scfa-li.org/open-enrollment-firefighter-i/

Is there a way to have the table show as before (with the first datetime displayed) and then when someone drills down into the course, all datetimes show?

Thanks, Frank


Tony

  • Support Staff

September 2, 2021 at 11:07 am

Oh, my apologies, I misunderstood your opening post as I thought you wanted all the dates on the table view template, not the single event view.

So in short, you looking to include expired datetimes on the datetime list section within the single event output?

If so, you can do that using a template file in your theme (preferable a Child Theme).

Copy \event-espresso-core-reg\public\Espresso_Arabica_2014\content-espresso_events-datetimes.php

Place the copy in your theme’s root directory.

Line 9 will have this:

<?php espresso_list_of_event_dates( $post->ID );?>

Change that to be:

<?php espresso_list_of_event_dates( $post->ID, '', '', true, true );?>

That will include expired datetimes (but not ‘Deleted’ datetimes) in the list datetime list by default on the single event output and event lists such as /events/ or [ESPRESSO_EVENTS]

Is that what you are looking for?


infrasolutions

September 7, 2021 at 8:14 am

Hi Tony, that works! Thanks for the assistance. -Frank


Tony

  • Support Staff

September 7, 2021 at 8:37 am

You’re most welcome.

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso