Home › Forums › Front-end Issues › How to display taxonomy labels › Reply To: How to display taxonomy labels
John,
Thanks for your reply.
I got it to work thanks to your little code-snippet.
The only thing I changed was the populating of the array in the foreach loop:
$term_names[] = $term->name;
By adding these square brackets you ‘tell’ the array to add the new value instead of overwriting it, which is the case if you don’t add those square brackets.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.