Assign archive templates to categories, tags and other taxonomy terms.
Assign custom archive templates to categories, tags and other taxonomy terms, similar to how WordPress page templates work.
Template selection is automatically enabled for all public taxonomies. Edit any term to choose a custom archive template.
- Zero configuration - works out of the box for all public taxonomies
- Choose templates per-term from the term edit screen
- Works with categories, tags, and custom taxonomies
- Backwards compatible with legacy "Category Template:" headers
- Lightweight with no dependencies
- Upload the plugin to your
/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Create template files in your theme with the header comment
Taxonomy Template: Your Template Name - Edit a category/term and select your template from the dropdown
Add a PHP file to your theme directory with this header comment:
<?php
/**
* Taxonomy Template: My Custom Template
*/All public taxonomies including categories, tags, custom taxonomies from plugins like WooCommerce product categories, and any custom post type taxonomies.
No. The plugin supports both Taxonomy Template: (recommended) and Category Template: (legacy) headers for backwards compatibility. Your existing templates will continue to work.
Yes. Add this to your wp-config.php before uninstalling:
define( 'RUNTHINGS_TAXONOMY_TEMPLATE_KEEP_DATA', true );Make sure your theme has at least one PHP file with either a Taxonomy Template: or Category Template: header comment. The dropdown only appears if templates are available to select.
Yes. Use the runthings_taxonomy_template_dirs filter to add additional directories. Note that subdirectories are not scanned automatically - you must add each folder path explicitly.
add_filter( 'runthings_taxonomy_template_dirs', function( $dirs ) {
$dirs[] = get_stylesheet_directory() . '/taxonomy-templates';
return $dirs;
} );Yes. Use the runthings_taxonomy_template_list filter to modify the available templates. The filename is a path relative to your theme root - if using a child theme, it checks the child theme first, then falls back to the parent theme.
add_filter( 'runthings_taxonomy_template_list', function( $templates ) {
// Add a template from theme root
$templates['My Custom Archive'] = 'custom-archive.php';
// Add a template from a subdirectory
$templates['Product Archive'] = 'template-parts/archive-product.php';
// Remove one you don't want
unset( $templates['Unwanted Template'] );
return $templates;
} );This plugin is a fork of the original "Advanced Category Template" plugin by Praveen Goswami. It was adopted because the original plugin was removed from the WordPress.org plugin directory due to security issues.
Your existing template mappings will be migrated automatically when you activate this plugin. You can safely deactivate and delete the old plugin in any order.
- Template selection dropdown on the term edit screen.
- Forked from Advanced Category Template by Praveen Goswami
- Added namespace and modern PHP structure
- Fixed security issues found in original plugin
- Added proper sanitization and escaping
- Renamed to runthings-taxonomy-template
- Auto-enabled for all public taxonomies (no settings page needed)
- Added support for "Taxonomy Template:" header (with backwards compatibility for "Category Template:")
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see https://www.gnu.org/licenses/gpl-2.0.html.
