🔥 Black Friday Sale: Get 65% OFF Any PageForge Pro Plan! Use code BF65 Claim Offer →
Conta Get it free
Category Template Hierarchy icon
Possivelmente abandonado Tested up to 3.3.2

Category Template Hierarchy

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…

Instalações ativas100+100+ nível
Downloads · 30d149▲ +69.3% vs prev. 30d
Classificação5/53 comentários
Pontuação da saúde32/100Em risco
Downloads de todos os tempos19.9KSince Dec 2011
Suporte resolvido—Sem tópicos recentes
RequerWP 3.0Php qualquer
Downloads · 7d51▲ +54.5% week over week
Nosso veredicto

Considere uma alternativa

Category Template Hierarchy shows warning signs in 2026 — compare the alternatives below before installing. It runs on 100+ sites, is rated 5/5 and was last updated 15 years ago, and scores 32/100 on our health check.

  • Base de usuários pequenas (mais de 100 instalações ativas)
  • Muito poucos comentários até agora
  • Nenhuma atualização em 14 anos
  • Only tested up to WordPress 3.3 (latest is 7.1)

Como ele se acumula?

Lado a lado em instalações, atualizações, avaliações e suporte

Downloads diários

4812Sep 5Oct 19Dec 3
Ontem6
Média diária (1y)3
Dia de pico16Dec 2, 2026
Últimos 12 meses997

Os picos de download geralmente seguem uma nova versão — cada site que atualiza automaticamente é um download.

Rankings

Where Category Template Hierarchy stands today

WordPress.org Classificações de pesquisa

Posição ao vivo na pesquisa de plugins, top 100
Palavra chavePosiçãoPlugins concorrentesCategoria
categoria >100 10,000 Melhores plugins de categoria →
hierarchy >100 1,135 Best hierarchy plugins →
template >100 10,000 Best template plugins →
theme >100 10,000 Best theme plugins →
theme development >100 4,111 Best theme development plugins →

Adoção da versão

Compartilhamento de sites ativos por lançamento.

  • 1.3100.0%

Divisão de classificação

★★★★★ ★★★★★ 5 de 3 comentários

  • 5★100.0%
  • 4★0.00%
  • 3★0.00%
  • 2★0.00%
  • 1★0.00%

About Category Template Hierarchy

From the official readme · v1.3.2.1

Descrição

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.

Developer Notes: Template Hierarchy

What follows are is the modified list of templates available for category pages.
These expand upon the native 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

The parent and child templates only become available if the current category is
a parent or a child respectively.

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.

Developer Notes: Conditional Tags

With this plugin comes two additional conditional tags
which behave much like any other in WordPress. In a similar fashion to how one
might use is_category() or cat_is_ancestory_of(),
developers may, with this plugin, use the following functions:

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

Description (part 1)

The is_parent_category() and is_child_category() conditional tags check if
the page being displayed (or passed as an argument) is of a category that has
children (e.g. is a parent category) has a parent (is a child), respectively.
They are boolean functions, meaning they return either TRUE or FALSE.

Uso

<?php is_parent_category( $category ); ?>
<?php is_child_category( $category ); ?>

Parameters

$category (integer/string/object) (optional) Category ID, Category Slug, Category Object. Default: Current Category

Note: Unlike is_category(), these functions will not take arrays of categories or category titles. I’ll work on that. Sorry.

Return Values

(boolean) True on success, false on failure.

Exemplos

is_parent_category()
is_child_category()
// When any parent/child category archive page is being displayed

is_parent_category( '9' );
is_child_category( '9' );
// When the archive page for Category 9 is being displayed AND its a parent/child.

is_parent_category( 'blue-cheese' );
is_child_category( 'blue-cheese' );
// When the archive page for the Category with Category Slug "blue-cheese" is being displayed AND its a parent/child.

Description (part 2)

The is_parent_of_category() and is_child_of_category() conditional tags
check if a given category has a parent or child relationship to the current
category or a category passed as its second parameter. They are
boolean functions, meaning they return either TRUE or FALSE.

Uso

<?php is_parent_of_category($child_category, $parent_category, $direct_descendant); ?>
<?php is_child_of_category($parent_category, $child_category, $direct_descendant);?>

Parameters

(object/string/integer) (required) Category of the would-be parent/child respectively.
(object/string/integer) (optional) Category of the would-be child/parent respectfully. Default: Current Category
(boolean) (optional) Whether or not the child should be a direct child of the parent. Default: True
*

Return Values

(boolean) If the $direct_descendant flag set to true, function returns true if the child is a direct descendant of the parent, if child is no direct it will return false. If $direct_descendant is set to false it will return the same results as cat_is_ancestor_of().

Exemplos

The following function will return True…

is_child_of_category(0);
// When a top level category is being displayed, zero being the parent id value for top level categories (e.g. categories with no parents).

is_child_of_category(12);
// When the current category is a direct child of the category whose ID is '12'.

is_child_of_category('tv-shows')
// When the current category is a direct child of the category with the slug 'tv-shows' (can also be category ID's).

is_child_of_category('tv-shows', 'dexter');
// When the category with slug 'dexter' is a direct child of the category with the slug 'tv-shows' (can also be category ID's). This may come in handy when manipulating categories while not in a category template.

is_child_of_category('tv-shows', 'dexter', false);
// When the category with the slug 'dexter' is a descendant of the category 'tv-shows' at any level. (uses cat_is_ancestor_of())

is_child_of_category('tv-shows', null, false);
// When the current category is a descendant of the 'tv-shows' category at any level. (uses cat_is_ancestor_of())

is_parent_of_category(13);
// When the current category is the direct parent of a category with the ID '13'.

is_parent_of_category('dexter');
// When the current category is the direct parent of the category with the slug 'dexter'.

Backward Compatibility

The changes this plugin makes to the template hierarchy are significantly different
from that in 1.0.5 and before. If you prefer to use that version please find it
in the Older Versions in the WordPress plugins directory, it is tagged as 1.0.5.

While I do not actively support to QA the older version, I would gladly take a
look at any future bugs that crop up and are reported.

Instalação

  1. Upload plugin-name.php to the /wp-content/plugins/ directory
  2. Ative o plugin através do menu 'Plugins' em WordPress

Log de Changes

Important Update: v1.3.2 did not save correctly - v1.3.2.1 includes: Bug Fixes: 1. Fixed missing 'category.php' template, and fixed missing category-{slug}.php and category-{id} if category was neither parent or child.

1.3.2.1

  • Changes made in 1.3.2 were not properly checked in – this version is a re-release of 1.3.2 – apologies for the inconvenience.

1.3.2

  • Bug: [FIXED] category-slug.php and category-id.php were being excluded from the list of templates if the current category was neither a parent or a child.

1.3.1

  • Bug: [FIXED] Plugin was not finding ‘category.php’ when it was available.

1.3

  • Bug: [FIXED] Template Hierarchy manipulation was interfering with other parts of the native Template Hierarchy, now uses ‘category_template’ filter instead of ‘template_redirect’.
  • Bug: [FIXED] Child and Parent categories were not pulling $post and other normal globals into scope during the loop.
  • Minor Logic Change: is_child_of_category() and is_parent_of_category now check specifically for $category_parent->parent and $parent_category->term_id, because the way it was before, honestly did not make much sense.

1.2

  • Performance enhancement: Added a simple check to is_child_of_category_() and is_parent_of_category() to return false if empty, before bothering to check if there are relationships. Prevents a PHP notice caused by attempting to get the property of a non-object – this would occur when either function is called and the page is not a category at all.

1.1.1

  • Fixed ‘print_pre’ bug caused by a debugging function which I failed to remove when debugging was completed.

Registro de change completo em WordPress.org →

Para desenvolvedores

Este é o seu plugin? Mostre os números.

Adicione um crachá ao vivo ao seu site, Documentos ou Readme do GitHub. Ele é atualizado por conta própria - nenhuma conta necessária.

Selo de Instalações Ativas Selo de classificação Distintivo de pontuação de saúde

Best Category Template Hierarchy alternatives

All category plugins →
Alternativas
Classificação Plugin Instalações ativas Classificação Atualizada Saúde
1 Pages with category and tag Pages with category and tag Add Categories and Tags to Pages. by YAHMAN 50K+ ★★★★★★★★★★ 4.8 (28) 6 dias atrás 79
2 Search & Filter Search & Filter Search and Filtering for Custom Posts, Categories, Tags, Taxonomies, Post Dates and Post… by Code Amp 40K+ ★★★★★★★★★★ 4.5 (175) 3 meses atrás 68
3 Taxonomias PublishPress – Tag, Categoria e Gerenciador de Taxonomia – Autotagger adiciona termos automaticamente Taxonomias PublishPress Tags, categorias e termos WordPress são fáceis com taxonomias PublishPress. Adicione uma etiqueta ou… por PublishPress 40K+ ★★★★★★★★★★ 4.6 (195) 4 dias atrás 93
4 Categorias de biblioteca de mídia Categorias de biblioteca de mídia Adiciona a capacidade de usar categorias na biblioteca de mídia. Por Jeffrey-WP 20K+ ★★★★★★★★★★ 4.2 (52) 3 meses atrás 65
5 Add Category to Pages Add Category to Pages Easily add a Post Categories to Wordpress Pages by a.ankit 10K+ ★★★★★★★★★★ 4.7 (30) 7 anos atrás 46
6 Term Management Tools Term Management Tools Allows you to merge terms, move terms between taxonomies, and set term parents… por Scribu 10K+ ★★★★★★★★★★ 4.9 (76) 12 meses atrás 51
7 WP No Base Permalink WP No Base Permalink Removes category base or parents categories or tag base from your permalinks. Compatible… by Sergio 10K+ ★★★★★★★★★★ 4.1 (16) 7 anos atrás 38
8 Adjust Admin Categories Adjust Admin Categories Installing this plugin allows you to adjust the behavior of the area below the posts screen… by Masahiro NAKASHIMA 10K+ ★★★★★★★★★★ 5 (4) 4 anos atras 37
9 Parent Category Toggler Parent Category Toggler Automatically toggle the parent categories when a sub category is selected. by Ben Lobaugh (blobaugh) 10K+ ★★★★★★★★★★ 4.8 (15) 9 anos atrás 41
10 List Custom Taxonomy Widget List Custom Taxonomy Widget The List Custom Taxonomy Widget is a quick and easy way to display custom taxonomies… Por Nick Halsey 8K+ ★★★★★★★★★★ 4.7 (21) 5 meses atrás 77

FAQ

Category Template Hierarchy: quick answers

Respostas diretas, extraídas de dados ao vivo WordPress.org.

Fonte: WordPress.org

Is Category Template Hierarchy free?

Yes. Category Template Hierarchy is free to download and use from the official WordPress.org plugin directory.

Is Category Template Hierarchy safe to use in 2026?

Category Template Hierarchy shows warning signs in 2026 — compare the alternatives below before installing. It runs on 100+ sites, is rated 5/5 and was last updated 15 years ago, and scores 32/100 on our health check.

How many websites use Category Template Hierarchy?

Category Template Hierarchy is active on 100+ WordPress websites and has been downloaded 19,865 times since it launched in December 2011. It was downloaded 149 times in the last 30 days.

Does Category Template Hierarchy work with WordPress 7.1?

Category Template Hierarchy is officially tested up to WordPress 3.3.2, while the latest release is 7.1.5. It may still work, but try it on a staging site first.

When was Category Template Hierarchy last updated?

The latest version, 1.3.2.1, was released on March 24, 2012 (15 years ago).

Who makes Category Template Hierarchy?

Category Template Hierarchy is developed and maintained by Eddie Moya.

What are the best alternatives to Category Template Hierarchy?

The most popular alternatives to Category Template Hierarchy are Pages with category and tag (50K+ installs), Search & Filter (40K+ installs) and PublishPress Taxonomies (40K+ installs).

Alimentado por PageForge

Um modelo e uma planilha. Uma página real para cada pesquisa.

PageForge Transforma cada linha de um CSV em uma página WordPress com seu próprio título, URL, SEO campos e esquema, construído no layout que você já desenhou. Gratuito em WordPress.org.

  • CSV e XLSX, mais Google Sheets em Profissional e Empresarial
  • Seu próprio título, URL, SEO campos e esquema para cada página
  • Funciona com o editor de blocos, Elementor, Divi e Avada
  • Gratuito em WordPress.org, sem cartão de crédito

↑↓ mover↵ abrir