You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Hi @PanManAms,
Thanks for answering.
It is indeed via wp-api and I roughly the same function as the one provided by your plugin which I plug it directly in functions.php.
Vocabulary makes it hard to explain I guess !
Do you manage to get wp-api to display a Post Object's ACF
Let say I select a post from a Post Object ACF in home page
Wp-api will show this post like this
But the ACFs of my related Post Object "Bertrand Dupont" won't be displayed in the above. Hence I'll be missing some infos, while I 'd like to also have infos such as the one I have when I go to wp-json/posts/98 :
I think I have a similar problem. I'm using a relationship type field and the page I'm assigning comes with that filter: raw which don't have all information. I'm looking for a way to fetching those pages featured images.
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
The text was updated successfully, but these errors were encountered: