I have a custom field Field Name: "participants"
with Field Type: "User"
.
I want to use "NOT IN" in meta query but it is not working.
$getUid = $_REQUEST['uid'];
$args = [
'post_type' => 'polls',
'post_status' => 'publish',
'meta_query' => [
'relation' => 'AND',
[
'key' => 'participants',
'value' => [$getUid],
'compare' => "NOT IN"
]
]
];
$the_query = new WP_Query($args);
return $the_query;