We are currently using the grid layout to display our event list.
So far we have: title, excerpt, date and hour of the events.
We would like to also add the location of the event (ex: Paris)
Do you know if there is a way to display it?
You can load a custom version of the grid template by copying the template into your theme and modifying it there.
So you would copy /eea-events-grid-view-template/templates/espresso-grid-template.template.php
Place that in your theme’s root directory (preferably a Child Theme) and you add additional details to the output there.
Assuming your event is using a venue you could pull the venue from the event using something like:
$venues = $post->EE_Event->venues();
$venue = reset($venues);
if ($venue instanceof EE_Venue) {
//$venue is an EE_Venue object, use it to pull whatever value you need.
}
So in your example, you just want the city so in the above code you could add:
$city = $venue->city();
Then output the city variable where you need it to be.
The support post ‘Customizing Events Grid Layout’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.