Add ACF fields to Repeater items when using REST API

Question

I am currently building a Headless site using WordPress as a CMS, coupled with Nuxt 3, bridged with the REST API.

So far, everything’s been great, but I’m struggling with how to retrieve the ACF fields attached to items in a Repeater field, as the only response I’m getting is standard WordPress data (post title, ID, slug etc).

I am using just ACF for this implementation – not the ACF to REST API plugin – and would like to keep it that way, if at all possible, and I have ensured that I have enabled to ‘Show in REST API’ toggle for all the Custom Post Types and field groups attached to my post types.

If I attempt to get the same posts outside of the Repeater field – using the /{post-type}/{post_id} endpoint – the ACF fields appear as expected.

Is there any way to see the ACF fields attached to an item when called from within in a Repeater field?

Thank you!

0
Alex Ryans 4 months 2023-11-03T03:31:41-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse