如何限制JSON API WordPress插件

问题描述:

I want use WordPress to create a website, and I want export the site posts with JSON API.

I want to limit displayed posts by category but when click this link: get_category_posts (JSON API plugin in wordpress setting), I get this error:

{"status":"error","error":"Include 'id' or 'slug' var in your request."}

get_category_posts link : link.

How can I limit posts by category in JSON API WordPress plugin?

我想使用WordPress创建网站,我想用 JSON API导出网站帖子 代码>。 p>

我想按类别限制显示的帖子,但是当点击此链接: get_category_posts code>(wordpress设置中的JSON API插件)时,我收到此错误: p>

{“status”:“error”,“error”:“请求中包含'id'或'slug'var。”} p> \ n blockquote>

get_category_posts code> link: link .

nn

如何在JSON API WordPress插件中按类别限制帖子? p> div>

You've neglected to specify which category you actually want;

http://tellfa.com/tafrihgah/?json=get_category_posts=1

Correctly returns the data for category one for example.

I'm assuming you are using the plugin I've linked to below, you can use either the category ID or the slug. But you need to specify a category.

https://wordpress.org/plugins/json-api/other_notes/#Method:-get_category_posts