When using The Events Calendar plugin with the Reign theme, you may want to customize the templates to fit your needs. This guide outlines how to override The Events Calendar template files within the Reign theme.
Overriding The Events Calendar Templates
To override The Events Calendar templates, create the following directory structure within your theme and copy the corresponding files from The Events Calendar plugin.
Directory Structure
reign-child/
└── tribe/
└── events/
└── v2/
├── default-template.php
├── day/
│ └── event.php
├── latest-past/
│ └── event.php
├── list/
│ └── event.php
└── events-pro/
└── v2/
└── photo/
└── event.php
└── tribe-events/
└── single-event.php
Steps to Override
- Copy the template files: Copy the desired template files from The Events Calendar plugin directory (
wp-content/plugins/the-events-calendar/src/views/v2andwp-content/plugins/events-calendar-pro/src/views/v2) to the corresponding directories in your theme. - Customize the template files: Edit the copied template files in your theme to meet your customization requirements.
Example File Paths
- Default Template:
- Original Path:
wp-content/plugins/the-events-calendar/src/views/v2/default-template.php - New Path:
reign-child/tribe/events/v2/default-template.php
- Original Path:
- Day Event Template:
- Original Path:
wp-content/plugins/the-events-calendar/src/views/v2/day/event.php - New Path:
reign-child/tribe/events/v2/day/event.php
- Original Path:
- Latest Past Event Template:
- Original Path:
wp-content/plugins/the-events-calendar/src/views/v2/latest-past/event.php - New Path:
reign-child/tribe/events/v2/latest-past/event.php
- Original Path:
- List Event Template:
- Original Path:
wp-content/plugins/the-events-calendar/src/views/v2/list/event.php - New Path:
reign-child/tribe/events/v2/list/event.php
- Original Path:
- Photo Event Template (Events Calendar Pro):
- Original Path:
wp-content/plugins/events-calendar-pro/src/views/v2/photo/event.php - New Path:
reign-child/tribe/events-pro/v2/photo/event.php
- Original Path:
- Single Event Template:
- Original Path:
wp-content/plugins/the-events-calendar/src/views/tribe-events/single-event.php - New Path:
reign-child/tribe-events/single-event.php
- Original Path:
By following these steps, you can ensure that your customizations remain intact even when The Events Calendar plugin or the parent Reign theme is updated.
