Support

Home Forums Event Espresso Premium Changing date to display range rather than start date

Changing date to display range rather than start date

Posted: December 18, 2012 at 11:46 am

Viewing 4 reply threads


Matthew Willis

December 18, 2012 at 11:46 am

Hello,

I am setting up an event registration for an event that goes through the weekend. I have the start and end dates set up correctly (Start Date: 2013-04-19, End date: 2013-04-21 . But when I view the event on the page I’ve set it up in, it shows “Date: April 19, 2013.” Can I change this to reflect the fact that event spans multiple days? I don’t want potential registrants thinking that the only date is the first day. Thank you in advance for your help!

Matthew


Jonathan Wilson

December 18, 2012 at 2:18 pm

Hello Matthew,

You can do this by editing the event_list_display.php template file in the event-espresso/templates directory.

You will need to add the following code on line 76.

<p id="event_date-<?php echo $event_id ?>"><span class="section-title"><?php _e('End Date:', 'event_espresso'); ?></span>  <?php echo do_shortcode('[EVENT_TIME event_id="'.$event_id.'" type="end_date" format="F jS"]'); ?>

Be sure and copy the event_list_display.php file to the wp-content/uploads/espresso/templates directory to prevent it from being over written during an upgrade.


Matthew Willis

December 18, 2012 at 7:43 pm

Hi Jonathan. Thanks for that info!

Currently line 76 of event_list_display.php contains a single character: a closing curly bracket (“}”). Could you tell me if this new code should be placed before or after this character? Based on my limited php experience, I don’t imagine it would replace it.


Matthew Willis

December 18, 2012 at 7:50 pm

Update: I tried all three options: before the bracket, after the bracket and replace the bracket. In all three cases my code editor reports a syntax error. Please advise. Thanks!


Dean

December 19, 2012 at 12:23 am

Hey Matthew,

It’s likely you are placing it in slightly the wrong place. Though we give line numbers these are not always accurate (especially if you or we have modified the code already!)

Basically you need to look for similar code which will output the start date and add this code below it. Have a look at this screenshot and hopefully it will make things clearer. http://d.pr/i/6eRJ

Viewing 4 reply threads

The support post ‘Changing date to display range rather than start date’ 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