-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Hey there !
I'm not using wp-json-api-acf plugin, but I use roughly the same function in my theme.
I'm stuck when using a Post Object ACF in a post : Post Object ACF is part of the required post, but doesn't include it's own ACFs.
To illustrate :
Let's say we have a HOME page with a Post Object ACF from which you pick the post "ABOUT".
This post ABOUT has the_title, the_content, as well as a subtitlle in a simple Text Field ACF.
If I call ABOUT, the resulting post object will encompass the simple Text Field ACF, as expected.
However if I call HOME, the resulting HOME post object will encompass the ABOUT post object, but only core fields (the_title/the_content). ABOUT post object in HOME won't show ABOUT's text field ACF.
Maybe we should add a condition in the function above to recursively look for ACF in ACF Post Objects, using acf/format_value/type={$field_type} where $field_type = post_object ?
Any thought on this ?
Thanks