Templates
For theme developers customizing how events display on your site.
How the override system works
NetterTech Events ships complete PHP templates for every view it renders. You can replace any of them by copying the file to your theme. No plugin edits required, and your changes survive plugin updates.
The plugin resolves templates in priority order:
- Child theme:
wp-content/themes/your-child-theme/nettertech-events/ - Parent theme:
wp-content/themes/your-parent-theme/nettertech-events/ - Plugin bundled templates (fallback)
If your theme has a nettertech-events/ directory, the plugin looks there first. Files it finds there take precedence over the plugin’s bundled versions.
Setup
Create a nettertech-events/ directory inside your theme (or child theme). Then copy the template you want to customize from the plugin:
cp wp-content/plugins/nettertech-events/templates/parts/event-card.php \
wp-content/themes/your-theme/nettertech-events/parts/event-card.php
Replace your-theme with your theme’s folder name – you can find it under Appearance > Themes in your WordPress admin (shown beneath the theme name). After copying the file, load any event page to confirm your changes appear.
Edit the copy in your theme. The plugin will use your version automatically.
Available templates
Main page templates
| File | What it controls |
|---|---|
single-event.php | Individual event page |
series-page.php | Recurring event series overview (all upcoming dates) |
archive-events.php | Events listing/archive page |
archive-past-events.php | Past events archive |
Component templates (parts/)
These are smaller pieces that the main templates assemble:
| File | What it controls |
|---|---|
parts/event-card.php | Card component used in grids and carousels |
parts/occurrence-row.php | Row in occurrence date lists |
parts/event-filters.php | Category filter and search bar |
parts/pagination.php | Page navigation |
parts/empty-state.php | “No events found” message |
Single event parts
| File | What it controls |
|---|---|
parts/single-event-header.php | Title and metadata |
parts/single-event-image.php | Featured image |
parts/single-event-description.php | Event content |
parts/single-event-occurrence.php | Date, time, and venue for one occurrence |
parts/single-event-upcoming.php | Upcoming dates list on series pages |
Email templates
Email templates follow the same override mechanism. Copy to nettertech-events/emails/ in your theme:
| File | Sent when |
|---|---|
emails/customer-confirmation.php | Ticket purchase completed |
emails/rsvp-confirmation.php | RSVP submitted |
emails/venue-notification.php | Staff order alert |
emails/event-reminder.php | Pre-event reminder (sent day before) |
Template variables
Each template receives a specific set of PHP variables. These are documented in the plugin’s source files and in the Template Override Guide in the plugin repository.
The most commonly customized template is parts/event-card.php. Its variables:
| Variable | Type | Description |
|---|---|---|
$occurrence | Occurrence | The specific occurrence being displayed |
$event | Event | The parent event |
$show_image | bool | Whether to render the featured image |
$show_date | bool | Whether to render the date |
$show_venue | bool | Whether to render venue info |
Example override that changes the card markup while keeping existing functionality:
<?php
/** @var NetterTechEvents\Models\Occurrence $occurrence */
/** @var NetterTechEvents\Models\Event $event */
?>
<article class="my-event-card">
<?php if ( $show_image && $event->get_featured_image_url() ) : ?>
<img src="<?php echo esc_url( $event->get_featured_image_url( 'medium' ) ); ?>"
alt="<?php echo esc_attr( $event->get_title() ); ?>">
<?php endif; ?>
<h3>
<a href="<?php echo esc_url( $occurrence->get_permalink() ); ?>">
<?php echo esc_html( $event->get_title() ); ?>
</a>
</h3>
<time datetime="<?php echo esc_attr( $occurrence->get_start_datetime()->format( 'c' ) ); ?>">
<?php echo esc_html( $occurrence->get_formatted_date() ); ?>
</time>
</article>
Hooks for dynamic customization
Template overrides handle static markup changes. For data injection or conditional logic, hooks are usually a better tool than copying an entire template file.
nte_template_args - Filter the variables passed to any template before it loads. Useful for injecting custom data without touching the template file:
add_filter( 'nte_template_args', function( $args, $file ) {
if ( str_contains( $file, 'event-card.php' ) ) {
$args['sponsor_logo'] = get_option( 'my_sponsor_logo' );
}
return $args;
}, 10, 2 );
nte_template_paths - Add or reorder the directories the plugin searches. Useful for plugins or page builders that want to ship their own template sets.
nte_get_template_part - Filter the list of candidate filenames before resolution. Lets you conditionally load a different template variation based on context (category, user role, etc.).
See the Hooks Reference for the full list of template-related filters.
Compatibility notes
Some template elements are required for JavaScript to work correctly. Elements with data- attributes and specific class names drive the calendar navigation, AJAX filtering, and check-in UI. When customizing templates, inspect the original markup for these before removing anything.
After plugin updates, check the plugin’s changelog for template changes. The plugin follows semantic versioning: patch releases never change templates, minor releases may add new variables (backwards compatible), major releases may include breaking template changes.
Maintaining a README.md inside your nettertech-events/ theme directory documenting which templates you’ve overridden and why will save time when auditing after updates.
See also: Hooks reference | Settings | Getting started