get_catname

Retrieve the category name by the category ID.

Description

(string) get_catname( (int) $cat_ID ); 

Returns (string)

category name

Parameters (1)

0. $cat_id (int)
The cat id.

Usage

  1. if ( !function_exists( 'get_catname' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4. // The cat id. 
  5. $cat_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = get_catname($cat_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/deprecated.php  
  1. function get_catname( $cat_ID ) { 
  2. _deprecated_function( __FUNCTION__, '2.8.0', 'get_cat_name()' ); 
  3. return get_cat_name( $cat_ID );