WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get category template

Contents

Description

Retrieve path of category template in current or parent template.

Works by retrieving the current category ID, for example 'category-1.php' and will fallback to category.php template, if the category ID file doesn't exist.

Usage

<?php get_category_template() ?>

Parameters

None.

Return Values

(string) 
Returns path of category template in current or parent template.

Examples

Notes

Filters

  • Calls 'category_template' filter on found path:
    apply_filters('category_template', $template)

Change Log

Since: 1.5.0

Source File

get_category_template() is located in wp-includes/theme.php.

Related

See also index of Function Reference and index of Template Tags.