With the following function you can get the first term of a post by the post’s id. The function requires 3 parameters: $post_idThe id of the post to retrieve the term from. $taxonomyThe taxonomy to retrieve terms from. $outputWhat you want to return from the term. (term_id, name, slug, description etc.).