Get taxonomy name for the current post

Question

I am trying to get the name for a custom taxonomy assigned to the current post and in my template I have:

   $countries = get_terms( 'country', array('hide_empty' => false,));$fcountry = $countries[0]->slug;  However this returns the first item in the $countries array, instead of the term that is assigned to the current post.

0
8 months 2020-11-23T14:10:19-05:00 0 Answers 10 views 0