[wordpress插件] Custom Taxonomy Templates自定义分类模板

wordpress 插件 文章 2020-04-10 01:00 503 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

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:

就像创建自定义页面模板的方式一样,此插件使您可以通过将以下内容添加到文件顶部来构建自定义taaxonomy存档模板:

  <?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”).

其中{Taxonomy Singular Label}应替换为为分类法注册的单标签(例如“ Category”或“ 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

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!

    • 非常感谢 Mkdgs

    0.2

    0.2

      • Fix fatal error when using child themes
      • 修复使用子主题时的致命错误

      • added “custom_taxonomy_templates” filter for extendibility
      • 添加了“ custom_taxonomy_templates”过滤器以实现可扩展性

安装步骤

    1. Upload the whole plugin directory to the /wp-content/plugins/ directory
    2. 将整个插件目录上传到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Enjoy!
    6. 享受!

下载地址
https://downloads.wordpress.org/plugin/custom-taxonomy-templates.zip
-EOF-

AI助手支持GPT4.0