ACF Repeater Field in a Looper

Is there any update on when ACF repeater fields will be included in Pro please. I’m desperate for this functionality to finish a project I’m currently working on.

I’ve managed to them to pull through using a custom provider but its showing the whole list and I’ve no control over how they are displayed.

Has anyone has managed to get it working yet ?

** SOLVED **

With the help of some others of Facebook this solved.

You need to add the following to the Functions.php file in your child theme.

// This makes ACF Repeater fields work in a looper using the Custom type
// Custom Looper provider, use as “Hook”: my_acf_repeater
// and in the “Params” field, enter the name of your ACF repeater field like so:
// {“field”: “REPEATER_FIELD_NAME”}
// add a consumer with the setting {{dc:looper:field key=“SUB_FIELD_NAME”}}
add_filter( ‘cs_looper_custom_my_acf_repeater’, function( $result, $args ) {
return get_field( $args[‘field’] );
}, 10, 2);

Then, in the Custom Looper provider, use as “Hook”: my_acf_repeater

and in the “Params” field, enter the name of your ACF repeater field like so:

{

“field”: “REPEATER_FIELD_NAME”

}

This works flexibly for any repeater field.

In the Looper consumer, you can read the sub-fields inside your repeater like so:

{{dc:looper:field key=“SUB_FIELD_NAME”}}

1 Like

Glad to hear you found a solution, @Kennyboy7 and thanks for sharing it.

1 Like

Great solution @Kennyboy7! Thanks for that.

It works fine for a repeater that repeats simple ACF Fields that contain data.

But i am trying to use this filter on an ACF Repeater field that repeats an ACF Group Field containing several simple sub-fields. I imagine ACF Group Field stores those other fields in key:values inside an array, but my php knowledge is limited.

Any ideas?

Hi @dmconsulting,

Can you please let us know what exact error or issue you are getting while working with the ACF Group field? I would request you to create a new thread and provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

thank you @tristup .

i set up a new thread in Retrieving Field Data inside ACF Repeated Group Fields

Hi Brigham.

Great and just wait for your ticket to be answered by me or my colleagues.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.