get_cat_name

Advertisement

Summery Summery

Retrieves the name of a category from its ID.

Syntax Syntax

get_cat_name( int $cat_id )

Parameters Parameters

$cat_id

(Required) Category ID.

Return Return

(string) Category name, or an empty string if the category doesn't exist.

Source Source

File: wp-includes/category.php

	}
	return $category->name;
}

/**
 * Check if a category is an ancestor of another category.
 *
 * You can use either an id or the category object for both parameters. If you

Advertisement

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Advertisement

Leave a Reply