fbpx
Participate in our upcoming live webinar on WP Event Manager CRM plugins on 29th May at 10pm IST. Register Now!
How can we help?

How to override archive template

In order to override the Archive Template files, please follow the steps mentioned below:

  1. Copy your template file – wp-content/plugins/wp-event-manager/templates/content-event_listing_category.php
  2. Paste the file in your child theme: wp-content/themes/YOUR-THEME/wp-event-manager/content-event_listing_category.php

Enter the following code in the functions.php file

add_filter( 'archive_template', 'wpem_event_archive', 20 );

function wpem_event_archive($template)
{
if ( is_tax( 'event_listing_category' ) ) {

$template = get_template_directory() . '/wp-event-manager/content-event_listing_category.php';
    }
    elseif ( is_tax( 'event_listing_type' ) ) {

$template = get_template_directory() . '/wp-event-manager/content-event_listing_type.php';
    }

    return $template;
}

Or,

You can simply rename the archive template file while pasting it in the Child theme

  1. Copy your template file – wp-content/plugins/wp-event-manager/templates/content-event_listing_category.php
  2. Paste the file in your child theme: wp-content/themes/YOUR-THEME/wp-event-manager/taxonomy-event_listing_category.php (rename template).
How To Override Archive Template
Editorial Team

Our team constantly explores ways that technology can help us reinvent industries. We want to change the world by creating great products that transform industries. We Dream It, We Make It.

Quick Links
Close
Close