Not sure if I’m missing something, but I’d like to use an ACF field as a data attribute value.
Intended output would be data-bv=“321” but it is only outputting the name data-bv. The div involved has a basic text element that has the same dynamic field {acf_serving_weight} and that loads in fine.
I’ve tried with the acf field as text as well as number and niether are working. I can get other dynamic fields to work fine, such as the post id, but nothing from my acf field group.
I feel like I’m missing something or just misunderstanding how this would work, but I’ve seen other people using ACF fields in this way.
I’m watching this because I’m sitting with the same issue. Attribute is showing, but attribute data is empty. I’ve even set up ACF using the value : label format. Doesn’t work.
Wow! I’m feeling so dumb I’ve been using query loop for a while, but not this time. And my dynamic data wasn’t working. After searching, I came here, and it feels like Ahhh! Thank you!
I have almost exactly the same problem and I find out that the issue is in wanting to call custom field inside loop of another custom field (repeater).
Example:
Custom field 1
Custom field 2 - repeater
– Custom field 3 inside
– Custom field 4 inside
I want to add dynamic attribute (Custom field 1) to element that is inside query loop of Custom field 2.