WP_Query tax_query multiple taxonomies and terms

时间:2017-08-30 20:28:04

标签: php wordpress post custom-post-type taxonomy

I'm having a bit of trouble returning posts with multiple taxonomies and terms. Hoping someone with far more knowledge than myself can help me understand.

I'm using a select menu to populate the select options with taxonomy information of a page (in this case, the Products page). All is good with a single taxonomy and term in the tax_query but as soon as I try to use an array to pass multiples, i'm no longer returning anything. This seems simple enough but I'm missing something. Any ideas?

Here is what I'm working with:

content

1 个答案:

答案 0 :(得分:1)

You error is a key array tax_query => sed -Ez 's/define (host|service) \{[^}]+db\.xxx\.yyy[^{}]+\}//g' file should be -z

define host {
    host_name   drac.vs2.xxx.yyy
    address     10.5.220.48
    use         yyy-drac
    parents     router.xxx.yyy

}

Reference wordpress