Home › Forums › Add-ons › Repeater Field › Get Term ID from repeater sub field and Options page › Reply To: Get Term ID from repeater sub field and Options page
There are 2 issue with your code that I can see:
1. You are using the_sub_field, when you should be using get_sub_field
2. Your $args are OUTSIDE the has_sub_field loop so your WP_Query or get_posts call will only happen once, not for each row in the repeater field
Thanks
E
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.