Support

Home Forums Event Espresso Premium Add event time to Event List and Single Event

Add event time to Event List and Single Event

Posted: September 8, 2014 at 9:23 am

Viewing 10 reply threads


Trevor Tessier

September 8, 2014 at 9:23 am

Hello, I am wondering if there is an easy way to code in the event_list and single event to show the event time automatically? All the events on the site have a single time but I would like to automate the process if possible. I looked around the forums and didn’t find what I was looking for. This is the latest EE3.


Tony

  • Support Staff

September 8, 2014 at 9:26 am

Hi Trevor,

The event_list and single event should show the event time by default.

Within your events have you set ‘Display registration form?’ to No?


Trevor Tessier

September 8, 2014 at 9:38 am

That is correct. We are using the shopping cart due to multiple prices per event.


Tony

  • Support Staff

September 8, 2014 at 9:40 am

Then that’s the reason for the Event time being hidden.

The Event time is part of the registration form as events with multiple times chave a dropdown selection, this would be confusing for a user if just a dropdown time appeared within the events and no registration form.

To fix this you’ll need to edit a couple of event espresso template files. Do you have FTP access to the site?


Trevor Tessier

September 8, 2014 at 9:44 am

I do 🙂


Tony

  • Support Staff

September 8, 2014 at 10:07 am

The templates are within plugins/event-espresso/templates.

You’ll need to copy 4 files.

event_list.php
event_list_display.php
registration_page.php
registration_page_display.php

You only need to edit 2 of those files the ones with _display but they also need their partner files copying when you do modifications.

So place those 4 files within wp-content/uploads/espresso/templates/

Start with registration_page_display.php, line 154 to 156. An opening php tag, a closing bracket and a closing php tag. – http://take.ms/yPY4Y

Move that to line 143, like so – http://take.ms/RlMDG

All you are doing is moving the where the condition check:

if ($display_reg_form == 'Y') {

to end before the event times.

The registration form should now display the times.

event_list is a little trickier, on checking it doesn’t include code to display the event time, so we’ll need to add it. Copy lines 146 to 155 from registration_page_display.php – http://take.ms/mo5uv

Paste that code after the closing p tag on line 88 but before the closing div tag, like this – http://take.ms/bRluH

You may need to play around with the location, or styling to get it to look exactly how you prefer.

Does that help?


Tony

  • Support Staff

September 8, 2014 at 10:08 am

Be sure to make a backup before doing this, just to be safe.

We have a guide available here:

https://eventespresso.com/wiki/how-to-back-up-your-site/


Trevor Tessier

September 8, 2014 at 1:32 pm

Awesome, I will try it out!


Trevor Tessier

September 10, 2014 at 2:19 pm

That did the trick! Thank you very much. One last question. There was a post about changing the event_list “available spaces” text. Is that still possible? I know this was changed as per this support item https://eventespresso.com/wiki/how-to-customize-your-available-spaces-text/


Lorenzo Orlando Caum

  • Support Staff

September 10, 2014 at 5:22 pm

Hello,

Try this out:

https://gist.github.com/lorenzocaum/1b8276d05749b90a8ea4


Lorenzo


Trevor Tessier

September 11, 2014 at 9:27 am

Thanks everyone! All set. Much appreciated.

Viewing 10 reply threads

The support post ‘Add event time to Event List and Single Event’ 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