Title: WP Use parent template
Author: kanonji
Published: <strong>2011 年 11 月 6 日</strong>
Last modified: 2011 年 12 月 6 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/wp-use-parent-template.svg)

# WP Use parent template

 作者：[kanonji](https://profiles.wordpress.org/kanonji/)

[下载](https://downloads.wordpress.org/plugin/wp-use-parent-template.zip)

 * [详情](https://cn.wordpress.org/plugins/wp-use-parent-template/#description)
 * [评价](https://cn.wordpress.org/plugins/wp-use-parent-template/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/wp-use-parent-template/#developers)

 [支持](https://wordpress.org/support/plugin/wp-use-parent-template/)

## 描述

#### Features

 * use parent template for child category.
 * use parent template for child page.

If you have works category with some child categories as followings, you may want
to use ‘category-works.php’ for all three child categories. You need to copy as ‘
category-design.php’ and the rest in default template hierarchy. WP Use parent template
patches the template hierarchy to use parent template for these child categories.
And also pages too.

 * example.com/works/design
 * example.com/works/illust
 * example.com/works/photo

#### Category template hierarchy

 1. category-{slug}.php
 2. category-{id}.php
 3. category-{parent slug}.php //Add by WP Use parent template
 4. category-{parent id}.php //Add by WP Use parent template
 5. category.php
 6. archive.php
 7. index.php

#### Page template hierarchy

 1. custom template file
 2. page-{slug}.php
 3. page-{id}.php
 4. page-{parent slug}.php //Add by WP Use parent template
 5. page-{parent id}.php //Add by WP Use parent template
 6. page.php
 7. index.php

See following for WordPress default template hierarchy.
 https://codex.wordpress.
org/Template_Hierarchy

#### Notes

 * Able to use only one generation age template. ‘category-child.php’ is able to
   use as parent template for grandchild in the example of ‘example.com/parent/child/
   grandchild’.
 * You may need to change parent template to handle child data.

## 评价

此插件暂无评价。

## 贡献者及开发者

「WP Use parent template」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ kanonji ](https://profiles.wordpress.org/kanonji/)

[帮助将「WP Use parent template」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wp-use-parent-template)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/wp-use-parent-template/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/wp-use-parent-template/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/wp-use-parent-template/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/wp-use-parent-template/)。

## 更新日志

#### 0.4

 * Fix readme.txt

#### 0.3

 * Fix readme.txt

#### 0.2

 * Released.

#### 0.1

 * My local use.

## 额外信息

 *  版本 **0.4**
 *  最后更新：**15 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3.2 或更高版本 **
 *  已测试的最高版本为 **3.2.1**
 *  语言
 * [English (US)](https://wordpress.org/plugins/wp-use-parent-template/)
 * 标签
 * [category](https://cn.wordpress.org/plugins/tags/category/)[hierarchy](https://cn.wordpress.org/plugins/tags/hierarchy/)
   [page](https://cn.wordpress.org/plugins/tags/page/)[template](https://cn.wordpress.org/plugins/tags/template/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-use-parent-template/advanced/)

## 评级

 1 星（最高 5 星）。

 *  [  0 条 5 星评价     ](https://wordpress.org/support/plugin/wp-use-parent-template/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/wp-use-parent-template/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/wp-use-parent-template/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/wp-use-parent-template/reviews/?filter=2)
 *  [  1 条 1 星评价     ](https://wordpress.org/support/plugin/wp-use-parent-template/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-use-parent-template/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/wp-use-parent-template/reviews/)

## 贡献者

 *   [ kanonji ](https://profiles.wordpress.org/kanonji/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/wp-use-parent-template/)