it's possible to show user if my logic like this it's better to give illustration
USER
I have two users with usermeta:
user A have usermeta country with value "USA" and univ with value "UCLA"
user B ONLY have usermeta country with value "USA"
POST
I also have two posts:
post 1 contain postmeta country with value "USA"
post 2 ONLY have postmeta country with value "USA" and state with value "TX"
LOGIC
IF post have postmeta "COUNTRY" => "USA":
ECHO user A & user B
IF post have postmeta "COUNTRY" => "USA" AND have postmeta "UNIV" => "UCLA"
ONLY ECHO user A
so in post 1 show all user A & b but in post 2 only show user A because user A have state.
My code so far
get_users(array(
'orderby' => 'display_name',
'order' => 'asc',
'meta_query' => array(
'relation' => 'OR', // Optional, defaults to "AND"
array(
'key' => 'verifier_assign_country',
'value' => $countryCode,
'compare' => '='
),
array(
'relation' => 'AND',
array(
'key' => 'verifier_assign_univ',
'value' => $univCode,
'compare' => 'LIKE'
)
)
)
), 'objects');
Thank you for help