Using Template Files

Events Manager was built on the principle of being as flexible as possible. One of the  recent features in EM is the addition of template files and overriding support in your themes.

Whilst you are able to modify the look and feel of almost any output event information, it is sometimes necessary to use more complex code, or integrate some PHP from your theme or another plugin. Whatever the reason may be, it is now possible to simply insert specific files into your theme which will override certain aspects of Events Manager.

Events Manager uses templates from within the plugin folder to format things like calendars, event pages, event registration forms, etc. and therefore when it calls these templates it first checks to see whether it should use the same one from your theme instead. This folder is called templates:

To override any of these files, you should place the the each file within the same folder structure in your theme folder starting from, not including the first templates folder. Here is a common example that highlights this point and a commonly made mistake.

Example – Overriding the Calendar HTML

We’ll give you a common example, using the above folder structures,  which is overriding the large calendar. This file is located at wp-content/plugins/events-manager/templates/templates/calendar-full.php.

Rather than editing this file directly, copy it to wp-content/themes/twentyten/plugins/events-manager/templates/calendar-full.php and edit it there, as it will not be overwritten when you update Events Manager.

Common mistake: Files within the templates folder are not put within wp-content/themes/twentyten/plugins/events-manager/templates/templates/, note the extra templates folder in this path compared to the previous one.