跳到内容

Custom-Single

v1.0.0

Tor N. Johnson · 2013年12月11日 上架

Enables themes to support custom single.php templates per category in the form single-CATEGORYID.php.

正在使用
10+
评分
暂无
累计下载
2,154
最近更新
2013年12月11日
需要 WordPress 3.5+已测试到 3.7.41

贡献者

This plugin enables themes to specify a different single.php template based on post category. As posts can have multiple categories assigned, it uses the following to select which possible custom template to use:

1) Categories directly assigned
— Check for extant single-CATEGORYID.php files and prioritize based on category order
2) Parents of categories
— Parents are checked based on category order of the directly assigned categories.

Note, the above assumes that there’s a category order plugin installed. If the categories are NOT in a specific order AND there are multiple categories assigned per post then the template selection will be left up to the server. Naturally, if there is only category assigned per post (or only one possible template per post), then there will be no issue.

Requirements

Plums

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

导航

说明

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

© 2026 Plums