Filtering elements by taxonomy slug
Have a look at the documentation for the_terms(). It requires at least two parameters – the post ID, and the taxonomy name. You’re not giving it either of these (I am of course assuming your taxonomy isn’t called taxonomy-name). However, you’re also using the wrong function for the situation. the_terms() is used to display (i.e. … Read more