Posted: May 31, 2014 at 11:06 am
|
on event registration page, we only see the date but not the time of the event. It is also the case on the upcoming event widget. I know i can click on register to see the details of an event, but would like to have time shown on the registration page and on upcoming event widget. any setting that we can change to make this happen? thanks, |
|
Hi Karen, The time can be added in fairly easily to the event list, but you will need to edit a template file to do so. Copy these two files: /wp-content/plugins/event-espresso/templates/event_list.php The need to go in this location. /wp-content/uploads/espresso/templates/ Then edit event_list_display.php and at approx line 131 just after the dat information add the following <p id="event_date-<?php echo $event_id ?>"><span class="section-title"><?php _e('Time:', 'event_espresso'); ?></span> <?php echo event_date_display($event->start_time, get_option('time_format')) ?> That will add the start time into the list. The widget is similar. Copy over the widget.php file and edit line 130 so it reads <li><a href="<?php echo $registration_url; ?>"><?php echo stripslashes_deep($event->event_name) ?> - <span class="widget-event-date"><?php echo event_date_display($event->start_date) ?> - <?php echo event_date_display($event->start_time, get_option('time_format')); ?></span></a> If you are not sure what to do with all this code, you may need assistance from your web developer. |
|
for the first step, do you mean the following? IF so, i made a mistake by overwriting /wp-content/uploads/espresso/templates/. thanks, |
|
Hi,
Yes that’s correct.
Recovery may be difficult. If you had any modifications in there then you would need to check if you had a backup (often backup plugins back up the uploads directory). If you didn’t have any modifications then it should not be an issue, as there would be nothing important in there.
The uploads/espresso/ directory is there so that you can copy over template files and modify them. That way updating the plugin will not delete your modifications. |
|
perfect! we are a new customer so nothing to backup in that directory. another small enhancement request- how to remove year from the widget? thanks, |
|
Hi, You’re welcome. In the widget code you edited earlier you need to tweak it slightly. Chaneg it to this <li><a href="<?php echo $registration_url; ?>"><?php echo stripslashes_deep($event->event_name) ?> - <span class="widget-event-date"><?php echo event_date_display($event->start_date, 'd-m') ?> - <?php echo event_date_display($event->start_time, get_option('time_format')); ?></span></a> The important part here is the ‘d-m’ bit. As it is that will show 04-06 (4th June). You can modify the style by using the PHP date formats (http://php.net/manual/en/function.date.php) e.g. ‘D jS M’ equals Wed 4th Jun |
|
that is exactly what i needed. |
The support post ‘in EE3, how to show event time on event registration page’ 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.