get_the_terms


get_the_terms ( $post, $taxonomy )

Parameters:
  • (int|WP_Post) post Post ID or object.
  • (string) taxonomy Taxonomy name.
Returns:
  • (WP_Term[]|bool|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

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

Related Functions

get_the_term_list, the_terms, get_the_title_rss, get_the_tags, get_the_date

Top Google Results

User discussions

wpseek mobile