Support

Home Forums Event Espresso Premium EE3 How to show event time on registration page

EE3 How to show event time on registration page

Posted: March 24, 2015 at 1:07 pm


Holly Frank

March 24, 2015 at 1:07 pm

On the event registration page, the date is displayed but not the event time. How do I add this to the registration page under the date? Thank you.

http://centralcoasticc.com/events/


Dean

March 25, 2015 at 5:33 am

Hi,

You would need to modify the template files, see here for an overview: https://eventespresso.com/wiki/put-custom-templates/

Specifically the event_list_display.php

On lines 87-90 is this

<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>

After that you could add this:

<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_meta['start_time'], get_option('time_format') ); ?> 
		</p>


Holly Frank

March 25, 2015 at 1:22 pm

Hello Dean,
That did work for the start time. I need to add the end time, too. Can you tell me how to do that? Thank you so much!


Josh

  • Support Staff

March 25, 2015 at 6:02 pm

Hi Christina,

You can add the end time by adding something like this:

<?php echo ' - ' . event_date_display($event_meta['start_time'], get_option('time_format') ); ?>


Holly Frank

March 25, 2015 at 7:15 pm

Hi Josh,
I haven’t added this yet, but I’m confused because it appears to be the same as the last line of the previous code you gave me. Is that accurate? Thank you.


Josh

  • Support Staff

March 25, 2015 at 8:03 pm

I’m sorry for the confusion, it should be

<?php echo ' - ' . event_date_display($event_meta['end_time'], get_option('time_format') ); ?>


Holly Frank

March 25, 2015 at 8:29 pm

Hi Josh,
I made the assumption that this line should go below the previous code you gave me for the start time. I added it, but now there is just a dash below the start time. I would like the the time information to display like this (the times I used are for the example):

Time: 8:00 am – 12:00 pm

Can this be done? Thank you!


Dean

March 26, 2015 at 5:51 am

Hi,

The $event_meta oddly doesn’t have the end time.

Remove the code Josh added, and replace what I gave you with this:

		<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>

That should sort it for you.


Holly Frank

March 26, 2015 at 12:33 pm

That did the trick. Thank you!! 🙂

The support post ‘EE3 How to show event time on 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.

Event Espresso