Hi,
since yesterday I tried to make a WP_Query with 2 relationship with a AND relation.
Here is the content of the array of my query.
Array
(
[post_type] => recipe
[paged] => 1
[posts_per_page] => 9
[relationship] => Array
(
[0] => Array
(
[id] => recipes_to_brands
[to] => 75
)
[1] => Array
(
[id] => cheeses_to_recipes
[from] => 73
)
[relation] => AND
)
)
With that, no result.
If I exclude one of the two relation, I have my result.
So with
Array
(
[post_type] => recipe
[paged] => 1
[posts_per_page] => 9
[relationship] => Array
(
[0] => Array
(
[id] => recipes_to_brands
[to] => 75
)
[relation] => AND
)
)
And
Array
(
[post_type] => recipe
[paged] => 1
[posts_per_page] => 9
[relationship] => Array
(
[0] => Array
(
[id] => cheeses_to_recipes
[from] => 73
)
[relation] => AND
)
)
I have each time the same post found.
If I replace AND by OR, my result is found but I don't want to use an OR 😉
Wordpress Core, Metabox and Meta Box Aio are on last version.