跳到内容

Custom Taxonomy Templates

v0.2.1

shazdeh · 2016年3月1日 上架

Define custom templates for taxonomy archive views.

正在使用
90+
评分
5.0 / 5
累计下载
4,260
最近更新
2016年11月22日
1 条评价需要 WordPress 4.4+已测试到 4.6.30

贡献者

截图

Assigning custom templates to a term in custom taxonomy
Assigning custom templates to a term in custom taxonomy

Just like the way you can create custom page templates, this plugin enables you to build custom taaxonomy archive templates by adding this bit to the top of your file:

<?php
/**
 * {Taxonomy Singular Label} Template: Grid
 */
?>

where {Taxonomy Singular Label} should be replaced with the singular label registered for the taxonomy (for example “Category” or “Tag”). Now when you’re adding or editing terms in that taxonomy, you can choose the desired template file.

You can safely include this plugin in your theme and ship custom templates for taxonomy archives with the theme.

Changelogs

0.2.1

  • Allow using taxonomy slug in the template header, fix issue with templates not being found in multilingual websites. Much thanks to Mkdgs for the fix!

0.2

  • Fix fatal error when using child themes
  • added “custom_taxonomy_templates” filter for extendibility

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums