在一个URL WP-API中使用两个分类法术语



目前我正在使用这样的URL调用分类术语数据-

http://scd.blaze.wpengine.com/wp-json/posts?type=listings&filter[listing_area]=northwest

有没有一种方法可以同时调用两个分类术语,比如这样的?-

http://scd.blaze.wpengine.com/wp-json/posts?type=listings&filter[listing_area]=northwest&filter[listing_area]=northeast

我已经阅读了所有的文档,但我正在努力寻找解决方案,非常感谢andy的帮助,提前感谢!

在不了解完整代码的情况下,很难做到100%,但请尝试。。。

http://scd.blaze.wpengine.com/wp-json/posts?type=listings&filter[listing_area][]=northwest&filter[listing_area][]=northeast

通过在listing_area的每个引用的末尾添加[],您现在正在传递一个值数组。否则,您只需传递查询字符串中的最后一个值。

最新更新