WordPress.org

Codex

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

Function Reference/get cat name

Description

Retrieve the name of a category from its ID.

Usage

<?php get_cat_name$cat_id ?>

Parameters

$cat_id
(integer) (required) Category ID
Default: None

Return Values

(string) 
Category name

Examples

<?php echo get_cat_name(4);?>

returns the name for the category with the id '4'.

Notes

Change Log

Since: 1.0.0

Source File

get_cat_name() is located in wp-includes/category.php.

Related

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