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

ACF data for 'Post Object' field #50

Open
xanderseren opened this issue May 19, 2016 · 0 comments
Open

ACF data for 'Post Object' field #50

xanderseren opened this issue May 19, 2016 · 0 comments

Comments

@xanderseren
Copy link

I'd like to display ACF data for the 'Post Object' field in the wp-api. At the moment it just spits out the basic post data.

acf: {
  post-object: [
    {
      ID: 57,
      post_author: "1",
      post_date: "2016-05-16 07:25:34",
      post_date_gmt: "2016-05-16 07:25:34",
    }
  ]
},

This is what I want....

acf: {
  post-object: [
    {
      ID: 57,
      post_author: "1",
      post_date: "2016-05-16 07:25:34",
      post_date_gmt: "2016-05-16 07:25:34",
      acf: {
        some-data: 'Some data'
      }
    }
  ]
},

I guess I'd have to account for a potential infinite loop of referenced post objects. Anyone have any insight into how I can modify acf-to-wp-api to accomplish this?

@xanderseren xanderseren changed the title ACF data for 'Post Object' ACF data for 'Post Object' field May 19, 2016
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

1 participant