SOLVED: Can't show ACF repeater field in frontend

Hello,

I’m trying to pull data from a repeater custom field called “phone”. It is an array but in the frontend it shows me the index

image

Any idea?

I’m going to sleep right now but it will help if you share the Bricks version you’re using and screen shots of backend (ACF setup and content od the element that hold ACF dynamic data).

Hello Matias,

I’m using bricks 1.4.0.2


And that is my repeater configuration


The field with data

Thanks, and how are you using this field in the element content in the Bricks editor?

Ok, I guess I get it. You’re using a repeater subfield as if it was a standard (single) ACF field. In your last screenshot, you have two rows with telephone numbers, so if you want to show both of them, you need to loop over each row/item.

A good example of how to set this up was provided in this answer.

It looks like you’re using an element with items like tabs etc. If true, you would need to nest and element and use the loop on it. Would be easier to tell if you showed the whole structure panel.

2 Likes

Hello @yosnap

As @Matiasko said, you need to set a Query Loop using the ACF repeater as query type so you could fetch the repeater sub-fields values.

Thank you @luistinygod

It’s solved with @Matiasko answer.

Now I’m looking for hiding those fields if there is no data

Thank you all

1 Like

Be my guest again :smiley: Conditional - hide if no data - #3 by Matiasko

1 Like