admin管理员组文章数量:1429433
This post can be a solution, but I guess there could be something more linear or native:
The official REST API guide is not really clear to me, and doesn't have much examples.
I've got a custom 'dealer_areas' taxonomy, hierarchical (continents > countries > regions).
I need to build a small js app based on that and, even if I could use the 'regular' admin-ajax way, this time I'd like to use the REST API instead.
I use / client (just to have some syntax sugar and pretty printing), but it could be any. If I ask for this, I get some terms, but not all:
http GET dev.example/my-site/wp-json/wp/v2/dealer_areas
I get terms from every nesting level, but not all.. And they're not returned based on post counts, so it really seems there's no logic in this.
Anyway, I'd like a direct way to get all the terms from all nesting levels (even empty ones).
Is there any or am I forced to create a custom route?
本文标签: How to get all the terms from a custom hierarchical taxonomy via REST api
版权声明:本文标题:How to get all the terms from a custom hierarchical taxonomy via REST api? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745474077a2659881.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论