Home › Forums › Add-ons › Repeater Field › Repeater field with IF/ELSE based on sub_field value › Reply To: Repeater field with IF/ELSE based on sub_field value
without resetting post data when have_rows() is called in the second iteration it uses get_the_ID() to get the post ID in the current loop. If you do not reset the post data then it will get the post ID from the last post in the nested query loop. Since there is not rows for this repeater on that post it returns false.
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.