Template Files Override
In this guide, we will show you how you can customize or edit single event listing pages.
WP Event Manager plugin has a templates directory that contains all the template folders. This template folder includes form-fields directory.
Overriding template files via a theme
You can customize the template file by overriding it through 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 files by applying the “event_manager_locate_template” filter.
return apply_filters( 'event_manager_locate_template', $template, $template_name, $template_path );
This will return the template path which was going to be overridden.