【发布时间】:2017-03-16 09:40:58
【问题描述】:
我正在使用 WP API 创建一个 Android 应用程序。我设法在 REST API 中显示了一个自定义帖子类型,可以在以下位置查看:
http://localhost/wordpress/wp-json/wp/v2/property
现在我想按类别过滤属性,例如villa、home、rent等。我尝试了以下方法,但它不起作用:
http://localhost/wordpress/wp-json/wp/v2/property?filter[category_name]=villa`
http://localhost/wordpress/wp-json/wp/v2/property?filter[category]=apartment`
【问题讨论】:
标签: json wordpress wordpress-rest-api