WP-API / docs

The content for developer.wordpress.org/rest-api
https://developer.wordpress.org/rest-api
110 stars 621 forks source link

Global parameter: _fields=_embedded[wp:term][1][0].name #72

Closed LukaszJaro closed 4 years ago

LukaszJaro commented 4 years ago

Docs don't show example of how to do this, I'm still trying to figure it out:

https://developer.wordpress.org/rest-api/using-the-rest-api/global-parameters/#_fields

I can't filter _embedded fields.

TimothyBJacobs commented 4 years ago

The fallback fields filtering happens before the embedding happens, so this doesn't currently work.

Limiting the list of embedded fields is not currently supported. We're looking to change that in: https://core.trac.wordpress.org/ticket/39696

Only embedding a specific item of a given relation, ie only showing the first term is not currently planned. It'd be great to add this as a use case to the trac ticket above for consideration.

I'm going to close this out since this isn't a docs issue.

LukaszJaro commented 4 years ago

@TimothyBJacobs, thank you for the closure was going in circles with this!