get_the_terms ( $post, $taxonomy )
- (int|WP_Post) post Post ID or object.
- (string) taxonomy Taxonomy name.
- (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.
- Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Retrieves the terms of the taxonomy that are attached to the post.