我想用WordPress创建一个网站,我想用JSON API
导出网站帖子。
我想按类别限制显示的帖子,但当点击这个链接:get_category_posts
(wordpress设置中的JSON API插件)时,我得到了这个错误:
{"status":"error","error":"在您的请求中包含'id'或'slug'var。"}
get_category_posts
链接:链接。
如何在JSON API WordPress插件中按类别限制帖子?
您忽略了指定您真正想要的类别;
http://tellfa.com/tafrihgah/?json=get_category_posts=1
例如,正确返回类别一的数据。
我假设你使用的是我在下面链接的插件,你可以使用类别ID或slug。但您需要指定一个类别。
https://wordpress.org/plugins/json-api/other_notes/#Method:-get_category_posts