Template files override

Template Files Override

WP Event Manager Plugin has “templates” directory which contains all the templates files for rendering views at frontend side. This “templates” folder also includes “form-fields” directory which contains all the form control template files.

 

Template Files Override

 

Overriding template files via a theme

You can customize the template file by overriding it via your theme. Create new folder “wp-event-manager” inside your theme folder. e.g yourtheme/wp-event-manager. For example, you want to override plugins/wp-event-manager/content-summary-event_listing.php, then you can copy this file into yourtheme/wp-event-manager. Here we have shown exmple with Twenty Twelve theme.

Overriding template files via a theme

You need to update the custom version in the future to maintain compatibility if the files are updated in the core plugin. Hence the template files which need to be customized should only be overwritten.

 

Overriding template files through code

WordPress Plugin developers can also override template files by applying the “event_manager_locate_template” filter.

It will return template path which will going to override.