Core Function
View Source on Trac ↗ get_the_category_by_ID()
get_the_category_by_ID( mixed $cat_id ) Retrieves category name based on category ID.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $cat_id int | Category ID. Required |
Return Value
((string)
| WP_Error) Category name on success, WP_Error on failure.
Function Information
Since Version
0.71
Source File
wp-includes/category-template.php
Advertisement