Howdy!
With help from the post that you referenced and ACF documentation I have figured out how to do this and decided to share it with the themeco community. As a bonus I will include an example of how to apply it to the ACF Google Maps too.
So the following is to display elements from an array being output by ACF (Advanced Custom Fields).
Regular page structure:
-
First layer (e.g. section)
1.1. Looper Provider -> Dynamic Content -> Query Builder -> POST_TYPE
1.2. Looper Consumer
-
Second layer (e.g. row)
2.1. Looper Provider -> Dynamic Content -> ACF key (e.g. my_select_field)
2.2. Looper Consumer
-
Third layer (e.g. column)
3.1 Looper Provider -> Dynamic Content -> Looper current item
-
Fourth layer (e.g. div)
4.1. Looper Consumer
4.2. Element with dynamic content* (e.g. text). Use Looper field key.
Single or archive (layouts) structure:
Because these pages are already pulling in a post type through the page condition settings the first layer is redundant.
-
First layer (e.g. row)
1.1. Looper Provider -> Dynamic Content -> ACF key
1.2. Looper Consumer
-
Second layer (e.g. column)
2.1 Looper Provider -> Dynamic Content -> Looper current item
-
Third layer (e.g. div)
3.1. Looper Consumer
3.2. Element with dynamic content* (e.g. text). Use Looper field key.
*This will works with several ACF fields that output an array. With a select field for example you can use {{dc:looper:field key="label"}}
and {{dc:looper:field key="value"}}
to display the label and value respectively. The ACF Google Maps is another one that outputs an array and works the same way. The keys are as follows:
- Complete address:
{{dc:looper:field key="address"}}
- Street + house number:
{{dc:looper:field key="name"}}
- Street:
{{dc:looper:field key="street_name"}}
- Street (short):
{{dc:looper:field key="street_name_short"}}
- House number:
{{dc:looper:field key="street_number"}}
- City:
{{dc:looper:field key="city"}}
- State/province:
{{dc:looper:field key="state"}}
- Zip/postal code:
{{dc:looper:field key="post_code"}}
- Country:
{{dc:looper:field key="country"}}
- Country (short):
{{dc:looper:field key="country_short"}}
- Google Maps ID:
{{dc:looper:field key="place_id"}}
- Longitude:
{{dc:looper:field key="lng"}}
- Latitude:
{{dc:looper:field key="lat"}}
Above is confirmed to work in my test environment and hopefully @marc_a can confirm if this is the right way to go.