I have a custom taxonomy named Country. The values include individual country names as well as an 'International' field that is supposed to represent all countries.
This is how it is supposed to work. If I lookup by the value 'International' it should find all posts that has only 'International' as the country value. However, if I lookup by the value 'USA', it should find all posts that has a country value of 'USA' plus all posts that has country value of 'International' filtering out any duplicate posts.
I could make international as a parent to all other country values, but it will actually have reverse impact as finding posts by International will also pull up posts that is exclusively meant for, say, USA. I suppose I can have something like the below,
query_posts( array(
"tax_query" => array(
array(
"taxonomy" => "country",
"field" => "slug",
"terms" => array( "international", "usa" ),
"operator" => 'AND'
)
)
) );
But do I have to do it for all country values? Or how to do it conditionally only when the field value is not 'International'?