get_the_terms ( $post, $taxonomy )
- (int|object) $post Post ID or object.
- (string) $taxonomy Taxonomy name.
- (array|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: —
Retrieve the terms of the taxonomy that are attached to the post.