Home › Forums › Add-ons › Gallery Field › Gallery field – echo a custom taxonomy as a class in the image container › Reply To: Gallery field – echo a custom taxonomy as a class in the image container
No problem 🙂
The reason I suggested
wp_get_object_terms rather than
wp_get_post_terms is because the second function is really just a wrapper for the first which is meant to be used with regular posts. I’ve experienced some cases where such a wrapper function would not work for custom post types etc. and as thus always try to avoid using them out of context.
Best of luck in your project!
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!
© 2022 Advanced Custom Fields.