Posted: 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. |
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? |
|
|
That is correct. We are using the shopping cart due to multiple prices per event. |
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? |
|
|
I do 🙂 |
The templates are within plugins/event-espresso/templates. You’ll need to copy 4 files. event_list.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? |
|
Be sure to make a backup before doing this, just to be safe. We have a guide available here: |
|
|
Awesome, I will try it out! |
|
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/ |
Hello, Try this out: https://gist.github.com/lorenzocaum/1b8276d05749b90a8ea4 — |
|
|
Thanks everyone! All set. Much appreciated. |
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.