WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Category Template Hierarchy

Adds parent-category.php, child-category.php, and child-category-{slug|id} templates to the hierarchy and conditional tags to match.

Adds several new templates to the template hierarchy:

  • child-of-category-{slug}.php
  • category-{slug}.php
  • child-of-category-{id}.php
  • category-{term_id}.php
  • parent-category.php
  • child-category.php
  • category.php
  • archive.php
  • index.php

This greatly extends the native hierarchy of theme templates with regard to categories. Theme developers can now easily create separate templates for categories with children, with parents, and children of specific parents.

Additionally makes available four (4) new conditional template tags:

  • is_child_category();
  • is_parent_category();
  • is_child_of_category();
  • is_parent_of_category();

These functions are available for use in any theme or plugin as along as this plugin is active. For detailed documentation of these functions see the 'Developer Notes: Conditional Tags' section of this readme file.

Note: This plugin does not actually create parent-category.php, child-category.php or any of their related templates - rather it modifies the native template hierarchy to allow theme developers to create specific templates for parent and child categories.

Requires: 3.0 or higher
Compatible up to: 3.3.2
Last Updated: 2012-3-21
Downloads: 16,118

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1 100,1,1 100,1,1
100,1,1
100,1,1
100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 50,2,1 100,1,1 100,1,1 100,1,1
100,2,2
100,1,1
100,1,1