Skip to content

Commit 4b39649

Browse files
authored
REST API: _embed with _fields (WP-API#187)
1 parent 6b88eb3 commit 4b39649

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

using-the-rest-api/global-parameters.md

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ As of WordPress 5.4, the resources to embed can be limited by passing a list of
4747

4848
Resources in embed mode will contain an additional `_embedded` key next to the `_links` key containing the linked resources. Only links with the `embeddable` parameter set to `true` will be embedded.
4949

50+
In order to use `_embed` together with `_fields`, add `_embedded` as well as `_links` to the fields, for instance, `/wp-json/wp/v2/posts/_embed=author,wp:term&_fields=title,author,_links,_embedded`.
51+
5052
For more about linking and embedding, see the [Linking and Embedding](https://developer.wordpress.org/rest-api/linking-and-embedding/) page.
5153

5254
## `_method` (or `X-HTTP-Method-Override` header)

0 commit comments

Comments
 (0)