如何在 Wordpress REST API 中检索类别/标签列表 [英] How to retrieve a list of categories/ tag in Wordpress REST API
本文介绍了如何在 Wordpress REST API 中检索类别/标签列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有谁知道如何在 Wordpress JSON Rest API 中获取类别列表?似乎当前的 API 不支持检索类别列表(而 XML-RPC 支持).
Does anyone know how to get a list of categories in Wordpress JSON Rest API? It seems the current API does not support retrieve list of categories (While XML-RPC does).
http://developer.wordpress.com/docs/api/
推荐答案
Per WP REST API 页面你可以点击 http://example.com/wp-json/wp/v2/类别.这可能是对 Rest API v2 的补充,但我不确定.
Per WP REST API page you could hit http://example.com/wp-json/wp/v2/categories. This may be an addition to v2 of the Rest API, but I'm not sure.
这篇关于如何在 Wordpress REST API 中检索类别/标签列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文