【发布时间】:2019-03-28 02:10:41
【问题描述】:
在搜索端点中的 WP REST API (wp json) 中:
https://www.example.com/wp-json/wp/v2/search?search=searchPhrase&_embed
返回的数据是这样的:
0
id 5533
title "example"
url "https://www.example.co…"
type "post"
subtype "post"
_links
self
0
embeddable true
href "https://www.example.com/wp-json/wp/v2/posts/5533"
about
0
href "https://www.example.com/wp-json/wp/v2/types/post"
collection
0
href "https://www.example.com/wp-json/wp/v2/search"
它返回的数据不完整,如 /posts 端点包含更多字段,如 content excerpt ,...
如何完成/search端点的输出数据?
感谢您的宝贵时间。
【问题讨论】: