the_terms

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!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: