Skip to content

Instantly share code, notes, and snippets.

@lorenzocaum
Last active July 22, 2019 00:10
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save lorenzocaum/0a35fe4997992fdb1dc5 to your computer and use it in GitHub Desktop.
Save lorenzocaum/0a35fe4997992fdb1dc5 to your computer and use it in GitHub Desktop.
An overview of how the sample templates for Event Espresso 4 work together

This is an addendum to the steps for setting up sample templates tutorial for Event Espresso 4:

https://gist.github.com/lorenzocaum/16aac08f099d7c154f04

In this article, we'll go over how different templates work together. Afterwards, you should feel comfortable with locating the template file(s) that you need to edit to make a customization to an events page or venues page in Event Espresso 4.

Sample templates for Event Espresso 4 are available here:

/wp-content/plugins/event-espresso-core-reg/public/Espresso_Arabica_2014

Editing these files directly in the core plugin is not recommended. Please see the link above on how to safely relocate these templates for editing.

Event Espresso Event and Venue Pages

Here are examples of the different event-related pages for Event Espresso 4.

  • Event listings page (archive page for events): example.com/events/

  • Event category pages (taxonomy pages for events): example.com/event-category/my-new-event-category/

  • Single event pages (custom post type pages): example.com/events/my-awesome-event/

Here are examples of the different venue-related pages for Event Espresso 4.

  • Venue listings page (archive page for venues): example.com/venues/

  • Single venue pages (custom post types for venues): example.com/venues/my-awesome-venue/

  • Venue category pages (taxonomy pages for venues): example.com/venue-category/my-new-venue-category/

Event Templates

Archive Events Template

  • archive-espresso_events.php: template file for events listing page (archive page for events)

Taxonomy Events Template

Where is the template file for the event category pages?

  • taxonomy-espresso_event_categories.php: template file for event category pages (taxonomy pages for event categories)

You can create this file based on the archive-espresso_events.php.

Create a copy of the file below and rename as shown:

archive-espresso_events.php --> taxonomy-espresso_event_categories.php

Single Event Template

  • single-espresso_events.php: template file for single event pages listing page (custom post types for events)

Other Event Templates

  • loop-espresso_events.php: used by the archive-espresso_events.php file to display the loop (post content)

  • content-espresso_events.php: used by the loop-espresso_events.php file to display content in the loop

  • content-espresso_events-shortcode.php: used to display content for the [ESPRESSO_EVENTS] shortcode in the loop.

  • content-espresso_events-thumbnail.php: used by the content-espresso_events.php file to display the thumbnail (featured image) for an event

  • content-espresso_events-header.php: used by the content-espresso_events.php file to display the header (title and excerpt) for an event

  • content-espresso_events-tickets.php: used by the content-espresso_events.php file to display the tickets (pricing or registration options) for an event

  • content-espresso_events-datetimes.php: used by the content-espresso_events.php file to display the date times for an event

  • content-espresso_events-details.php: used by the content-espresso_events.php file to display the details (phone number and description) for an event

  • content-espresso_events-venues.php: used by the content-espresso_events.php file to display the venue information (location) for an event

Event Attendee Templates

  • loop-espresso_event_attendees.php: used by the [ESPRESSO_EVENT_ATTENDEES] shortcode to display the loop (post content)

  • content-espresso_event_attendees.php: used by the loop-espresso_events.php file to display content in the loop

Visualizing the Connection Between Event Template Files

archive-espresso_events.php
- loop-espresso_events.php
- - content-espresso_events-shortcode.php
- - content-espresso_events.php
- - - content-espresso_events-thumbnail.php
- - - content-espresso_events-header.php
- - - content-espresso_events-tickets.php
- - - content-espresso_events-datetimes.php
- - - content-espresso_events-details.php
- - - content-espresso_events-venues.php
taxonomy-espresso_event_categories.php
- loop-espresso_events.php
- - content-espresso_events.php
- - - content-espresso_events-thumbnail.php
- - - content-espresso_events-header.php
- - - content-espresso_events-tickets.php
- - - content-espresso_events-datetimes.php
- - - content-espresso_events-details.php
- - - content-espresso_events-venues.php
single-espresso_events.php
- - content-espresso_events.php
- - - content-espresso_events-thumbnail.php
- - - content-espresso_events-header.php
- - - content-espresso_events-tickets.php
- - - content-espresso_events-datetimes.php
- - - content-espresso_events-details.php
- - - content-espresso_events-venues.php
Notes on the [ESPRESSO_EVENT_ATTENDEES] shortcode
- - loop-espresso_event_attendees.php
- - - content-espresso_event_attendees.php

Venue Templates

Archive Venues Template

  • archive-espresso_venues.php: template file for venue listings page (archive page for venues)

Taxonomy Venues Template

Where is the template file for the venue category pages?

  • taxonomy-espresso_venue_categories.php: template file for venue category pages (taxonomy pages for venue categories)

You can create this file based on the archive-espresso_venues.php.

Create a copy of the file below and rename as shown:

archive-espresso_venues.php --> taxonomy-espresso_venue_categories.php

Single Venue Template

  • single-espresso_venues.php: template file for single venue pages listing page (custom post types for venues)

Other Venue Templates

  • loop-espresso_venues.php: used by the archive-espresso_venues.php file to display the loop (post content)

  • content-espresso_venues.php: used by the loop-espresso_venues.php file to display content in the loop

  • content-espresso_venues-thumbnail.php: used by the content-espresso_venues.php file to display the thumbnail (featured image) for an venues

  • content-espresso_venues-header.php: used by the content-espresso_venues.php file to display the header (title and excerpt) for an venues

  • content-espresso_venues-details.php: used by the content-espresso_venues.php file to display the details (phone number and description) for an venues

  • content-espresso_venues-location.php: used by the content-espresso_venues.php file to display the venue information (location) for an venues

Visualizing the Connection Between Venue Template Files

archive-espresso_venues.php
- loop-espresso_venues.php
- - content-espresso_venues.php
- - - content-espresso_venues-thumbnail.php
- - - content-espresso_venues-header.php
taxonomy-espresso_venue_categories.php
- loop-espresso_venues.php
- - content-espresso_venues.php
- - - content-espresso_venues-thumbnail.php
- - - content-espresso_venues-header.php
single-espresso_venues.php
- - content-espresso_venues.php
- - - content-espresso_venues-thumbnail.php
- - - content-espresso_venues-header.php
- - - content-espresso_venues-details.php
- - - content-espresso_venues-location.php