0
我正在使用WP API创建一个Android应用程序。我设法在REST API中显示一个自定义帖子类型,可以在以下位置查看:在WordPress中的REST API v2中按类别过滤自定义帖子类型
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`
谢谢:)救了我一天 –