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.
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.
- Update the custom version in the future to maintain compatibility if the files are updated in the core plugin. Hence the template file which needs to be customized should only be overwritten.
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 example with Twenty Twelve theme.
Overriding template file through code
WordPress Plugin developers can also override template file by applying the “event_manager_locate_template” filter.
<?php return apply_filters( 'event_manager_locate_template', $template, $template_name, $template_path ); ?>
This will return the template path which was going to be overriden.