👋 This article covers Views 2 (V2), the updated design of calendar views that shipped in The Events Calendar 5 and Events Calendar Pro 5. If you are using the legacy views, please check out the guide to customizing template files for Views 1.
The Events Calendar comes with a number of template files that determine how the plugin looks and behaves. We call these views. You can customize these files by placing copies of them in your theme.
It’s important that you don’t edit the view files directly in the plugin. Instead, we recommend overriding the files in your theme, which is what we are going to cover in this guide. This ensures that any changes you make to the files will not be lost when new versions of the plugins are released. In fact, we strongly recommend keeping your custom calendar view templates in a child theme, especially if you use a third-party theme that releases new versions. This plugin can be helpful for creating child themes. The Events Calendar will ensure that your modified files, in the correct folder, will override the plugin files.
OK, now that we’ve established some housekeeping rules, let’s dig into the process of customizing template files by overriding them in your theme.
Locating template files
Every plugin is located on your server where WordPress is installed in the
/wp-content/plugins folder. Here’s where you can find the template files for each plugin.
|The Events Calendar|
|Events Calendar Pro|
First, add a new folder in your theme
Once you’ve located the template file you want to customize, make a copy of it and save it somewhere for a moment, like your computer desktop.
Next, let’s head over to your theme folder and create a new folder. Not sure where your theme folder is located? It’s where WordPress is installed in the
/wp-content/themes folder. So if you are using the official Twenty Twenty theme, it would be at
/wp-content/themes/twentytwenty. Once you find it, create a new folder called
So far, you should have a new folder in your theme located at:
Now, which plugin or add-on does your copied template file belong to? You’ll need to make another folder that correlates with the plugin you are customizing. That includes the following:
|The Events Calendar (legacy views)|
|The Events Calendar (new views)|
|Events Calendar Pro|
With the new views, your folder structure should look like this:
Customize the template
Now that you’ve located the template you want to override, made a copy of it, created a new
tribe/ folder in your theme, and put the copied template file in its corresponding plugin folder, you can start customizing!
If you’re feeling stuck at any point in the process, we’ve put together an example of a customization that you can check out that walks through this process one step at a time.