Support

Account

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/