Definition:
function the_terms( $id = 0, $taxonomy, $before = '', $sep = ', ', $after = '' ) {}
Display the terms in a list.
Parameters
- int $id: Post ID.
- string $taxonomy: Taxonomy name.
- string $before: Optional. Before list.
- string $sep: Optional. Separate items using this.
- string $after: Optional. After list.
Return values
returns:False on WordPress error. Returns null when displaying.
Defined filters
- the_terms
apply_filters('the_terms', $term_list, $taxonomy, $before, $sep, $after)
Source code
function the_terms( $id = 0, $taxonomy, $before = '', $sep = ', ', $after = '' ) { $term_list = get_the_term_list( $id, $taxonomy, $before, $sep, $after ); if ( is_wp_error( $term_list ) ) return false; echo apply_filters('the_terms', $term_list, $taxonomy, $before, $sep, $after); }
3047
No comments yet... Be the first to leave a reply!