Home › Forums › ACF PRO › check if a certain value exists within query result › Reply To: check if a certain value exists within query result
Hm. The above code returns an array of all terms. I also tried out get_field_object which extends the array returning an array of all fields, labels, terms etc. I can’t see how the get_terms function would give a different result?
However how would I look over all terms?
I tried to compare using PHP in_array function but that didn’t work (it’s always giving me “true” no matter if the term is set or not).
Any idea on how to write that loop?
Thank you, Ralf
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!
ACF PRO’s Flexible Content field allows you to create smaller pieces of UI and compose them into whole flexible patterns. In our latest article, we show how to use it to create swappable site sections and integrate it all in a theme.https://t.co/ZRocH8oJSp— Advanced Custom Fields (@wp_acf) January 24, 2023
© 2023 Advanced Custom Fields.