Core Function
View Source on Trac ↗ get_the_term_list()
get_the_term_list(
mixed $post_id,
mixed $taxonomy,
mixed $before = '',
mixed $sep = '',
mixed $after = ''
) Retrieves a post's terms as a list with specified format.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $post_id int | Post ID. Required |
| $taxonomy string | Taxonomy name. Required |
| $before string | Optional. String to use before the terms. Default empty. |
| $sep string | Optional. String to use between the terms. Default empty. |
| $after string | Optional. String to use after the terms. Default empty. |
Return Value
((string)
(string | false | WP_Error) A list of terms on success, false if there are no terms,
WP_Error on failure.
Function Information
Since Version
2.5.0
Source File
wp-includes/category-template.php
Advertisement