Support

Home Forums Event Espresso Premium echo end date grid template

echo end date grid template

Posted: January 27, 2016 at 9:06 am


Meredith Whitely

January 27, 2016 at 9:06 am

How can I echo the end date on the grid view template?

Currently-
echo '<b class="start-date">' . $startdate . '</b>';

Is there an echo for the end date please?


Tony

  • Support Staff

January 27, 2016 at 9:15 am

Hi there,

Within the template you’ll see that $startdate is created on line 38 using this:

$startdate = date_i18n( $date_format . ' ' . $time_format, strtotime( $datetime->start_date_and_time('Y-m-d', 'H:i:s') ) );

There is no $enddate variable, but you can create one based on the above like this:

$enddate = date_i18n( $date_format . ' ' . $time_format, strtotime( $datetime->end_date_and_time('Y-m-d', 'H:i:s') ) );

Then echo $enddate in the same way as $startdate.

Note you’ll want to copy the template file to your sites child theme and modify the template there so that it will not be replaced when you update the plugin.


Meredith Whitely

January 27, 2016 at 9:41 am

That’s perfect, thanks Tony!

The support post ‘echo end date grid template’ 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