Posted: July 24, 2015 at 9:00 pm
I have set up classes that meet each day of the week for several months, say every monday from sept – dec. Each class is a single event with multiple dates assigned to it. I would like the display to show the range, i.e. Sept 17th-Dec 17th rather than listing every date separately. Is this possible? thank you. |
|
Hi Lisa, Could you please let us know the version of Event Espresso that you are using? You can check by logging into your WP dashboard and going to the plugins screen. If you are using Event Espresso 4, then there is a date range function available that can be added to one of the template files. Thanks — |
|
I am using 4 yes. I am currently hiding the dates via css since they are too long, I would very much like to show them! |
|
Hi Lisa, You can change the datetimes display to a range of dates by copying over one template from the Event Espresso 4 plugin’s /public/Espresso_Arabica_2014/ folder. Its name is content-espresso_events-datetimes.php. You copy this file to your active WordPress theme folder. We recommend setting up a a child theme to preserve your changes in the event of an update. Then, inside the template, you change this line of code:
to this:
|
|
This is wonderful and very appreciated. Is there any way to adjust the format? It currently displays the event like this: September 8, 2015 9:30 am – December 15, 2015 10:15 am Is it possible to display it as: September 8, 2015 – December 15, 2015 Similar to how an event with a single time would display? Thanks so much |
|
You can adjust the format by re-arranging the code that displays the dates and times from within the espresso_event_date_range() template tag. Since the espresso_event_date_range() function is pluggable and can load from your custom plugin (tip: make sure your plugin loads before Event Espresso does by naming it starting with the letters a-eu), you will not lose this change on an update. |
|
The support post ‘Displaying multiple dates as a range’ 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.