Function Reference/get the category

Admin Hírek

Returns an array of objects, one object for each category assigned to the post. This tag may be used outside The Loop by passing a post id as the parameter.

This function only returns results from the default “category” taxonomy. For custom taxonomies use get_the_terms.