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?
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