admin管理员组文章数量:1336304
I am developing a project that is using the WP REST API. After some tests, I realized that it's not retrieving all the categories based on what I am trying to GET. In precise, there are supposed to be 21 results but only 10 come up. Is there some kind of restriction that I am not seeing? Any settings that I'll have to change.
Here is what I am trying:
TIA
I am developing a project that is using the WP REST API. After some tests, I realized that it's not retrieving all the categories based on what I am trying to GET. In precise, there are supposed to be 21 results but only 10 come up. Is there some kind of restriction that I am not seeing? Any settings that I'll have to change.
Here is what I am trying:
https://example/wp-json/wp/v2/categories?parent=97
TIA
Share Improve this question edited Jul 21, 2020 at 17:47 abhivemp asked Jul 21, 2020 at 17:38 abhivempabhivemp 1135 bronze badges1 Answer
Reset to default 2As documented, the default number if results returned "per page" is 10. So you need to set per_page
to however many you want to retrieve:
https://example/wp-json/wp/v2/categories?per_page=30
本文标签: taxonomyWP REST API not retrieving all categories
版权声明:本文标题:taxonomy - WP REST API not retrieving all categories 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742243237a2438966.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论