What are template overrides, and how do I do them?
The Events Calendar comes with a default stylesheet file and templates for different views and widgets, tailored to the Twenty Eleven theme. Template overrides provide the ability to make copies of these files and modify them in your own theme, preserving your changes the next time you update the plugin.
If you would like to alter the stylesheet or any of the templates, simply create a new folder labeled “tribe-events” in your theme directory and copy over any of the files from within the plugin’s views folder (wp-content/plugins/the-events-calendar/views/). The plugin’s stylesheet, events.css, is located in wp-content/plugins/the-events-calendar/resources/.
In addition, if you are running the PRO plugin there are additional templates in its views folder (wp-content/plugins/events-calendar-pro/views/). Following is a list of all the files (including PRO) that you can override:
- events.css (located in the plugin’s /resources directory)
- events-advanced-list-load-widget-display.php (PRO)
- single-venue.php (PRO)
- widget-featured-display.php (PRO)
Feel free to mix files from free & PRO in the same folder. Then, edit the new files to your heart’s content. Please do not edit any of the above files in the plugin folder(s) as you will lose any of your changes the next time you update the plugin.
Keep in mind that there may be additions or changes to the core plugin templates files or CSS that will not be migrated to the copies you have made. In this case, you will need to manually go through the files you’ve modified to determine what is different and how to implement the core changes.