-
Notifications
You must be signed in to change notification settings - Fork 58
Embeds in collections #57
Comments
Thanks for the question. The docs are a little weak here, I will try to improve that. You should be able to get post _embed data directly from collections:
Here is how this looks in my console, with this parameter passed, the api returns all post meta data: |
Ahhhhh it was staring me right in the face the whole time. Thanks, I'm still learning all this. One question though: while now I can get to, say, |
@colinhowells: You could also use What happens when you try that? |
Turns out I had a dot in there I didn't need. I had |
Cool, marking this as resolved 👍 Thanks for building on this library! Please share your project with the rest-api team when/if its in a public place! |
Thanks for taking the time to help, I appreciate it! |
Is it possible to set _embed when using this? I gather that embeds are on for collections, but I'm unclear on what the syntax would be here; not sure if there's something like
var postsCollection = new wp.api.collections.Posts( {}. { embed: 'yup' } );
and embeds seem to be off by default.The text was updated successfully, but these errors were encountered: