kdaily
March 21, 2018 at 4:06 pm
Is there a way to seperate times from the dates so that it just displays the date of the class and not the time on both the event table and the event pages?
Tony
March 23, 2018 at 6:10 am
Add New Note to this Reply
Hi there,
Those changes will require customisation to the PHP used to output the display, are you comfortable with PHP, HTML and FTP?
kdaily
March 23, 2018 at 6:11 am
Add New Note to this Reply
Yup!
Tony
March 23, 2018 at 6:20 am
Add New Note to this Reply
Ok, so for the table view template, you copy the original template and place it within the root directory of a child theme, so copy this file:
/wp-content/plugins/eea-events-table-view-template/templates/espresso-events-table-template.template.php
Around line 148 you’ll have something like this:
echo date_i18n( $date_format . ' ' . $time_format, strtotime( $datetime->start_date_and_time('Y-m-d', 'H:i:s') ) );
Change that to:
echo date_i18n( $date_format, strtotime( $datetime->start_date('Y-m-d') ) );
For the event page the function used is pluggable, so you can this function to your child theme’s functions.php file:
https://gist.github.com/joshfeck/3673d6cec882edba8abd
kdaily
March 23, 2018 at 6:44 am
Add New Note to this Reply
Ok, I’ve got the table template done and the event pages done. How do I remove the time from the emails?
Tony
March 23, 2018 at 7:24 am
Add New Note to this Reply
You’ll need to edit those from within the admin, each template needs to be edited individually.
So for example, go to Event Espresso -> Messages -> Default messages templates -> Registration Approved -> Registrant.
Make sure you are editing the correct context:
https://eventespresso.com/wiki/messages-system-working-with-message-contexts/
In the DATETIME_LIST section you’ll have:
<li>[DATETIME_START] - [DATETIME_END]</li>
Change that to:
<li>[DATE_START] - [DATE_END]</li>
Save and retest.