Codex

Function Reference/get cat name

Contents

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

Categories: the_category(), the_category_rss(), single_cat_title(), category_description(), wp_dropdown_categories(), wp_list_categories(), get_the_category(), get_the_category_by_ID(), get_category_by_slug(), get_the_category_list(), get_category_parents(), get_category_link(), is_category(), in_category()

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