Support

Home Forums Event Espresso Premium Show events end time in table view

Show events end time in table view

Posted: June 12, 2020 at 6:07 am

Viewing 3 reply threads


benzett

June 12, 2020 at 6:07 am

Id like to show the events end time in table view.
if the end time is the same date, i want to show

date, starttime, endtime

if the end time is a separate date because the event has multiple days i want to show

start date, start time, end date, end time

is that possible?


Tony

  • Support Staff

June 12, 2020 at 7:26 am

Hi there,

Yes, this is possible, but you’ll need a custom template to display that info.

The template used by the add-on can be copied to the root directory of your theme (preferably a child theme) and EE will use that custom version in its place.

So copy the template \eea-events-table-view-template\templates\espresso-events-table-template.template.php

You can then edit the output however you prefer in that template, the closest we have to the output you are currently requesting is using the espresso_event_date_range() function.


benzett

June 14, 2020 at 2:16 am

I copied the template file and inserted the date_range function but then the table view page stopped working. i imagine i didnt insert the correct range of lines. would you specify which lines from the link you posted need to be inserted at which point in the template?


Tony

  • Support Staff

June 15, 2020 at 7:05 am

Generally, we don’t provide support for customizations and would recommend you contact a developer. However I can help point you in the right direction for this, within the template you’ll have this line:

<?php echo date_i18n( $date_format . ' ' . $time_format, strtotime( $datetime->start_date_and_time('Y-m-d', 'H:i:s') ) ); ?>

Change that for

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

Note that will only work if you do not set show_all_datetime=true on the shortcode as then you’ll be looping over all datetimes to output a date range multiple times.

Viewing 3 reply threads

The support post ‘Show events end time in table view’ 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