Support

Home Forums Event Espresso Premium Adding "Start Time" In Event Category List

Adding "Start Time" In Event Category List

Posted: April 10, 2014 at 7:37 pm


Daniel B

April 10, 2014 at 7:37 pm

I’ve currently been using the below event category short code
[EVENT_ESPRESSO_CATEGORY event_category_id=”category”]

I’m really liking this highly useful feature which displays

1)Event Title
2)Price
3)Date
4)Available Spaces

Is there a way to also include the Start Time as well on this listing of events without the user having to click on the registration page?

This would be extremely helpful and user friendly since I plan on having multiple events on the same day at different start times.

Also is there a way to change the name of the “Date” field on this category page to “Start Date” as it appears on the actual registration page?

Thanks in Advance!


Dean

April 11, 2014 at 12:40 am

Hi,

The EVENT_ESPRESSO_CATEGORY shortcode just uses the event list template as a basis, in fact it’s identical to using [EVENT_LIST category_identifier=””].

Anyway, the only way to add more information in is to edit the template file.

You can do this by copying both of these files:

event-espresso/templates/event_list.php
event-espresso/templates/event_list_display.php

over to wp-content/uploads/espresso/templates/

And the edit the event_list_display.php file accordingly.

The wording change can be done via the template edits, or via the language files (https://eventespresso.com/wiki/how-to-change-wording-with-poedit/) just be careful as there may be more than one Date string in the language files.


Daniel B

April 11, 2014 at 9:23 pm

Thanks Dean!

I moved the above mentioned php files to the template page as directed.

I then found a thread where you wrote the code for adding the event time:

<code>        				&lt;p class=&quot;event_time&quot;&gt;
	&lt;?php
						//This block of code is used to display the times of an event in either a dropdown or text format.
						if (isset($time_selected) &amp;&amp; $time_selected == true) {//If the customer is coming from a page where the time was preselected.
							echo event_espresso_display_selected_time($time_id); //Optional parameters start, end, default
						} else {
							echo event_espresso_time_dropdown($event_id);
						}//End time selected
	?&gt;
				&lt;/p&gt;</code>

I see as you posted in the other thread, that it would require some work in CSS to line up those event times with the rest of the the event list. I wouldn’t know where to begin to do something like that. But even without it, just having the date on there even if not perfectly aligned, I’m just so happy to have it on there now

Also, for changing the “Date” title I was able to find that as suggested in the event_list.php file as well.

For any other who may be wondering or discover this at a later time you just modify the <p id=”event_date-<?php echo $event_id ?>”><span class=”section-title”><?php _e(‘Date’, ‘event_espresso’); ?>

And where it says ‘Date’ is where you can modify it to say something else, most usefully in this case ‘Start Date’

Thanks Again!

The support post ‘Adding "Start Time" In Event Category List’ 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