Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post Object ACF doesn't diplay the Post own ACFs #7

Open
charleslouis opened this issue Jan 26, 2015 · 3 comments
Open

Post Object ACF doesn't diplay the Post own ACFs #7

charleslouis opened this issue Jan 26, 2015 · 3 comments

Comments

@charleslouis
Copy link

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

@PanMan
Copy link
Owner

PanMan commented Jan 27, 2015

Is this via the WP-API? It seems not? I'm not sure it has to do with this plugin (which you aren't using?) and/or the WP-API (are you using that?)

@charleslouis
Copy link
Author

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
image

Wp-api will show this post like this
selection_002

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 :

image

I hope it is clearer !

@fclaussen
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants