admin管理员组文章数量:1386798
I am trying to query data in gutenberg like search in REST API. Following this documentation:
/
I came up with this select:
wp.data.select("core").getEntityRecords("postType", "page", {
status: ["publish", "draft"],
per_page: 10,
search: "",
});
It suffers just one problem. It allows me query always only single post type but I need query both types - 'post' and 'page'. Altering select as follow does not work:
wp.data.select("core").getEntityRecords("postType", ["page", "post"], {
status: ["publish", "draft"],
per_page: 10,
search: "",
});
So how is it possible to query data in Gutenberg to get result like common search functionality has?
本文标签: javascriptGutenberg get core datasearch
版权声明:本文标题:javascript - Gutenberg get core data - search 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744546512a2611929.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论