Home › Forums › Add-ons › Repeater Field › ACF Repeater returns count of field in Search Loop › Reply To: ACF Repeater returns count of field in Search Loop
While I understand what you’re doing, it’s not really a good idea to depend on ACF returning an array of rows. Over the years I’ve been using ACF I’ve seen it change back and forth in places. I’ve coded for an array only to have sites break after an update because it was not longer returning an array in that place.
I’ll mark this for the developer to look at if he can. Since you marked this as the repeater add on I’m assuming you’re using ACF4, which isn’t really being updated except for bugs and changes to WP the make it required.
Your best bet is to use have_rows and get_sub_field whenever dealing with repeaters. http://www.advancedcustomfields.com/resources/have_rows/
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.