I am using angular to get a list of posts back from the post endpoint for the wp api.

These posts have different taxonomies and terms associated with them.

I want to use angular's search filters to quickly get through the list but I want to do it on each taxonomy's terms associated to the post.

The problem is, the post endpoint does not show associated taxonomy or terms for each post.

What's the best approach here?


Ok, I just stumbled upon the answer buried deep in the github issues page:


The answer is:

the reason is that the terms / meta etc are different objects, and in typical REST design going a GET on a single resource, will give you that resource, not that resource and a bunch of other ones too. However, you can pass _embed to the request which will include the linked resources in the response, for example see http://demo.wp-api.org/wp-json/wp/v2/posts/111?_embed

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.