Skip to content

Template Overrides

Template Overrides

Every piece of HTML that Tickets Please renders on the frontend comes from a template file inside the plugin’s templates/ directory. When you need to change the markup, layout, or structure of that output, you do not edit the plugin files. Instead, you copy the template to your theme, edit your copy, and Tickets Please loads your version instead of its own. Your customizations survive plugin updates because they live in your theme, not the plugin.

How Template Loading Works

When Tickets Please needs to render a template, it checks two locations in order:

  1. Your theme: [your-theme]/tribe/events/v2/
  2. The plugin: wp-content/plugins/tickets-please/templates/

If a matching file exists in your theme, the plugin uses it. If not, it falls back to the plugin’s default template. This is a standard WordPress pattern used by WooCommerce and other major plugins.

Overriding a Template

  1. Find the template you want to customize in the plugin’s templates/ directory. Note its path relative to templates/.
  2. Create the matching directory structure in your theme under tribe/events/v2/.
  3. Copy the template file into your theme’s directory.
  4. Edit your copy. Tickets Please will use your version from now on.

Example

To customize the checkout page template:

# Plugin template location:
wp-content/plugins/tickets-please/templates/checkout/checkout-form.php
# Copy to your theme:
wp-content/themes/your-theme/tribe/events/v2/checkout/checkout-form.php

Edit checkout-form.php in your theme. The plugin will load your version on the next page request.

Available Template Directories

The plugin’s templates/ directory is organized into these subdirectories:

DirectoryContents
admin/meta-boxes/attendee/Admin attendee meta box fields
admin/meta-boxes/event/Admin event meta box fields
admin/meta-boxes/event-sidebar/Admin event sidebar meta box
admin/meta-boxes/event-tickets/Admin ticket management meta box
admin/meta-boxes/organizer/Admin organizer meta box fields
admin/meta-boxes/ticket/Admin ticket meta box fields
admin/meta-boxes/venue/Admin venue meta box fields
checkout/WooCommerce checkout ticket sections
community/Community-submitted event templates
frontend/Frontend event display templates
my-tickets/My Tickets page output
order-success/Order confirmation page

You can override any file in any of these directories by mirroring the path structure under tribe/events/v2/ in your theme.

Programmatic Path Override

If you need to load templates from a location other than your theme’s tribe/events/v2/ directory — for example, from a custom plugin or a child theme with a different structure — use the tickets_please_template_path filter:

add_filter( 'tickets_please_template_path', function( $path, $template_name ) {
$custom_path = get_stylesheet_directory() . '/custom-events/' . $template_name;
if ( file_exists( $custom_path ) ) {
return $custom_path;
}
return $path;
}, 10, 2 );

The filter receives the resolved template path and the template name (e.g., checkout/checkout-form.php). Return a new path to override where the template loads from.

Best Practices

Use a child theme. If you are overriding templates in a third-party theme, create a child theme first. Template overrides in a parent theme will be lost when the theme updates.

Copy the entire file. Always start with a full copy of the original template. Do not create a partial file with only your changes — the plugin loads your file as a complete replacement, not a patch.

Check after plugin updates. When Tickets Please updates, the default templates may change. Compare your overridden files against the updated plugin templates to make sure you are not missing new variables, structural changes, or security fixes. The plugin changelog notes template changes when they happen.

Keep logic minimal. Template files should contain HTML and simple PHP output (loops, conditionals, escaped variables). Business logic belongs in your theme’s functions.php or a custom plugin, not in template files.

Test with a default theme. If your template override is not loading, switch temporarily to a default WordPress theme (like Twenty Twenty-Four) with the same override in place. This confirms whether the issue is in your template or in your theme’s template loading behavior.

Common Questions

Do I need to override templates to change colors and fonts? No. CSS changes do not require template overrides. Use your theme’s stylesheet or the WordPress Customizer’s Additional CSS panel to adjust visual styles. Override templates only when you need to change the HTML structure.

Can I override admin templates? Yes. The admin/meta-boxes/ templates control the admin editing interface. Override them the same way as frontend templates. This is useful when you want to rearrange fields or add custom admin UI elements.

What happens if I override a template and then deactivate my theme? WordPress falls back to a default theme that will not have your overrides. Tickets Please will load its own default templates until you reactivate a theme with overrides in place.

Will my overrides break if I update Tickets Please? Not immediately. Your files in the theme directory are untouched by plugin updates. However, if the plugin changes a template’s data structure (passes different variables, removes a variable), your override may need updating. Check the changelog after updates.

Can I override only part of a template? No. Template overrides are full-file replacements. If you only need to change one line, you still copy the entire template file. For small changes, consider using CSS or WordPress hooks instead of a full template override.

How do I know which template file renders a specific section? Enable WP_DEBUG in your wp-config.php. Tickets Please outputs HTML comments indicating which template file is being loaded when debug mode is on. Inspect the page source to find the comment markers.

Next Steps