Skip to main content
NetterTech
Event management for WordPress, done right.

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:

  1. Child theme: wp-content/themes/your-child-theme/nettertech-events/
  2. Parent theme: wp-content/themes/your-parent-theme/nettertech-events/
  3. 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

FileWhat it controls
single-event.phpIndividual event page
series-page.phpRecurring event series overview (all upcoming dates)
archive-events.phpEvents listing/archive page
archive-past-events.phpPast events archive

Component templates (parts/)

These are smaller pieces that the main templates assemble:

FileWhat it controls
parts/event-card.phpCard component used in grids and carousels
parts/occurrence-row.phpRow in occurrence date lists
parts/event-filters.phpCategory filter and search bar
parts/pagination.phpPage navigation
parts/empty-state.php“No events found” message

Single event parts

FileWhat it controls
parts/single-event-header.phpTitle and metadata
parts/single-event-image.phpFeatured image
parts/single-event-description.phpEvent content
parts/single-event-occurrence.phpDate, time, and venue for one occurrence
parts/single-event-upcoming.phpUpcoming dates list on series pages

Email templates

Email templates follow the same override mechanism. Copy to nettertech-events/emails/ in your theme:

FileSent when
emails/customer-confirmation.phpTicket purchase completed
emails/rsvp-confirmation.phpRSVP submitted
emails/venue-notification.phpStaff order alert
emails/event-reminder.phpPre-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:

VariableTypeDescription
$occurrenceOccurrenceThe specific occurrence being displayed
$eventEventThe parent event
$show_imageboolWhether to render the featured image
$show_dateboolWhether to render the date
$show_venueboolWhether 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