Core Function
View Source on Trac ↗ the_category()
the_category( mixed $separator = '', mixed $parents = '', mixed $post_id = false ) Displays category list for a post in either HTML list or custom format.
Parameters 2 required
| Name / Type | Description |
|---|---|
| string | $separator Optional. Separator between the categories. By default, the links are placed in an unordered list. An empty string will result in the default behavior. Required |
| string | $parents Optional. How to display the parents. Accepts 'multiple', 'single', or empty. Default empty string. Required |
| $post_id int | Optional. ID of the post to retrieve categories for. Defaults to the current post. |
Return Value
(void)
No return value description available.
Function Information
Since Version
0.71
Source File
wp-includes/category-template.php
Advertisement