Display ACF fields from custom post type within looper

I think I’m going mad! I must have set this kind of thing up 100 times, but for some reason I can’t seem to get this to work.

I have a post object ACF field setup to allow users to select testimonials to display on a particular page. The return format for this field is set to ‘post object’. This field is named ‘testimonial_selection’

Within my page, I have a slider setup and the looper provider is setup on the slider content wrapper (dynamic content and the input is set to: {{dc:acf:post_field field=“testimonial_selection”}}. I’m assuming this is correct as the field ‘testimonial_selection’ should be available to the page as I’m using other fields in the same way on the same page.

The looper consumer is set at the slide level at which point I should be able to access the post type ‘testimonial’ which will be returned by the post field, ‘testimonial_selection’. Within the testimonial post type, I have a field called ‘short_summary’ which I’m trying to display. However, this just comes back empty. Interestingly, I can output the looper index, so I can see there are three testimonials selected at the page level, but I can’t access any of the testimonial fields.

Solved. I should have had the field setup as a ‘relationship’ field, rather than a ‘post object’ field. Changing that made everything work as expected.

Hey @geoffmartyn,

We’re glad that you’re able to figure it out! If you have any other concerns or clarifications regarding our theme features, feel free to open up a new thread.

Thank you.

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