get_the_term_list
get_the_term_list ( $post_id, $taxonomy, $before = '', $sep = '', $after = '' )
Parameters:- (int) post_id Post ID.
- (string) taxonomy Taxonomy name.
- (string) before Optional. String to use before the terms. Default empty.
- (string) sep Optional. String to use between the terms. Default empty.
- (string) after Optional. String to use after the terms. Default empty.
Returns:- (string|false|WP_Error) A list of terms on success, false if there are no terms, WP_Error on failure.
Defined at: - Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Description
Retrieves a post's terms as a list with specified format.Terms are linked to their respective term listing pages.