How can we help?

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.

WP Event Manager template form fields

Overriding template files via a theme

You can customize the template file by overriding it via your theme.

  1. Create new folder “wp-event-manager” inside your theme folder. e.g yourtheme/wp-event-manager.
  2. 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.
    WP Event Manager Overriding template files via a theme

  3. 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.

Overriding template file through code

WordPress Plugin developers can also override template file 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 overriden.

Was this article helpful?
How can we improve this article?
How Can We Improve This Article?
Quick Links