How to use _embed when using _fields?

Question

It seems that if you use _fields in an API request also containing _embed, the _fields filter will filter out all embeds.

The following request:

domain.com/wp-json/wp/v2/posts?_fields=link,title&_embed=wp:featuredmedia

has no _embedded field, but it comes back if I remove the _fields filter. I also tried passing _fields=link,title,_embedded, but it doesn’t work either.

0
djjeck 3 years 2020-06-02T14:10:59-05:00 0 Answers 96 views 0

Leave an answer

Browse
Browse