我找到了解决办法。您必须转到“控制器/核心”文件夹。php,您必须更改函数get\\u recent\\u posts()。您必须添加此代码才能删除不需要的类别:
public function get_recent_posts() {
global $json_api;
// get all the categories from the database
$cats = get_categories();
// loop through the categries
foreach ($cats as $cat) {
// setup the cateogory ID
$cat_id = $cat->term_id;
// create a custom wordpress query
query_posts("cat=-434,-22837,-13571,-1,-18,-17385");
// start the wordpress loop!
while (have_posts()) {
$posts = $json_api->introspector->get_posts();
return $this->posts_result($posts);
}
}
}