I am trying to get the terms of a specific taxonomy to display on a page. The code is located in a page template and when I use 'get_the_terms' the result that shows is 'array'. Can someone explain this?
Wordpress Development - get the terms - returns 'array'
5.4k views Asked by Brandon Miller At
2
There are 2 answers
0
On
Slightly off-topic, but just yesterday I answered a question related to this over on wordpress.stackexchange.com. It uncovered some interesting variations on the theme of "getting taxonomies/terms associated with a post".
It's corrent. As reported in the codex page for get_the_terms() return an array of terms. You can then use the array later in your code.
Do
to discover the structure of the terms.
This example prints out the name of the terms that are retrieved by the function.