According to the WP documentation, it appears to be possible to put a meta_query argument to filter the taxonomy terms retrieved by the function get_terms. However, as seen below, I have tried doing it with the same syntax that I was using on my get_posts statement, and it doesn’t work.
WordPress seems to recognize this as valid, as it changes the results from giving me all terms to an empty array. But I am certain I have several terms where the ACF display_on_page is checked. Am I doing something wrong?
Thank you very much! I didn’t manage to get it to work properly, so since I don’t have all that many terms, I just fetched them all and put an if statement to control which ones were displayed. But interesting to know that it’s somehow possible.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
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