get_the_terms


get_the_terms ( $post, $taxonomy )

Parameters:
  • (int|WP_Post) $post Post ID or object.
  • (string) $taxonomy Taxonomy name.
Returns:
  • (WP_Term[]|false|WP_Error) Array of WP_Term objects on success, false if there are no terms or the post does not exist, WP_Error on failure.
Defined at:

Description

Retrieve the terms of the taxonomy that are attached to the post.

Related Functions

get_the_term_list, get_terms, the_terms, get_the_title_rss, get_the_time

Top Google Results

User discussions

wpseek mobile