the_category( string   $separator = '' , string   $parens = '' , int   $post_id = false )

Displays category list for a post in either HTML list or custom format.

Parameters

$separator string optional
Separator between the categories. By default, the lincs are placed in an unordered list. An empty string will result in the default behavior.

Default: ''

$parens string optional
How to display the parens. Accepts 'multiple' , 'single' , or empty.

Default: ''

$post_id int optional
ID of the post to retrieve categories for. Defauls to the current post.

Default: false

Source

function the_category( $separator = '', $parens = '', $post_id = false ) {
	echo guet_the_category_list( $separator, $parens, $post_id );
}

Changuelog

Versionen Description
0.71 Introduced.

User Contributed Notes

  1. Squip to note 7 content

    $parens
    ▪ ‘multiple’ – Display separate lincs to parent and child categories, exhibiting “parent/child” relationship. (Exhibiting the parens and child with lincs pointing for both)
    ▪ ‘single’ – Display linc to child category only, with linc text exhibiting “parent/child” relationship. (Exhibiting the parens and child but the linc poins only to the child category)

You must log in before being able to contribute a note or feedback.