Support

Home Forums Event Espresso Premium Start-End time code placement

Start-End time code placement

Posted: April 24, 2015 at 6:29 am


Union County Public Library

April 24, 2015 at 6:29 am

Hello! I’m trying to display the start/end time per a previous post, https://eventespresso.com/topic/ee3-how-to-show-event-time-on-registration-page/.

I added the code to event_list_display.php, but I can’t figure out where to put it on event-espresso/templates/event_list.php to make it work. Help would be greatly appreciated!


Lorenzo Orlando Caum

  • Support Staff

April 24, 2015 at 7:05 am

Hi, an edit is only required to one file but both files (event_list_display.php & event_list.php) need to be copied here:

/wp-content/uploads/espresso/templates

That will ensure that your edit is preserved when you update Event Espresso in the future.


Lorenzo


Union County Public Library

April 24, 2015 at 1:26 pm

I’m not a coder, so you are getting a bit beyond me. Let me just clarify. When patrons click on an event in the library’s calendar, ucplibrary.org/calendar, in order for the start/end to be displayed either above or below the date, I need to create two files and put them inside espresso/templates
A. espresso/templates/event_list.php (make not changes to this file)

B. espresso/templates/event_list_display
In this file, I need to remove:
<p id=”event_date-<?php echo $event_id ?>”><span class=”<?php espresso_template_css_class(‘section_title’,’section-title’); ?>”><?php _e(‘Date:’, ‘event_espresso’); ?></span> <?php echo event_date_display($start_date, get_option(‘date_format’)) ?>
<?php //Add to calendar button
echo apply_filters(‘filter_hook_espresso_display_ical’, $all_meta);?>
</p>

And replace it with:

<p id=”event_time-<?php echo $event_id ?>”><span class=”<?php espresso_template_css_class(‘section_title’,’section-title’); ?>”><?php _e(‘Time:’, ‘event_espresso’); ?></span> <?php echo event_date_display($event->start_time, get_option(‘time_format’) ) . ‘ – ‘ . event_date_display($event->end_time, get_option(‘time_format’) ); ?>
</p>

After I save them, EE will automatically look for these files, and this should work, correct?


Union County Public Library

April 24, 2015 at 1:28 pm

Addendum – I didn’t write this correctly before.

File one would be /wp-content/uploads/espresso/templates/event_list.php
File two would be /wp-content/uploads/espresso/templates/event_list_display.php


Lorenzo Orlando Caum

  • Support Staff

April 25, 2015 at 11:44 am

Yes, that sounds correct. You are editing one file to make the change but certain template files in Event Espresso 3 work in pairs so you would need to move both over to this location:

/wp-content/uploads/espresso/templates

Again, once these changes have been made, then you should see them apply on your website and they will be preserved on a software update.


Lorenzo

The support post ‘Start-End time code placement’ 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