Summery Summery
Retrieves the name of a category from its ID.
Syntax Syntax
Parameters Parameters
- $cat_id
-
(int) (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
Version | Description |
---|---|
1.0.0 | Introduced. |