Can't find a solution how to query posts without some specific value of meta_field that have many values.
The situation is:
I'm adding user id's on posts when they perform some specific operation. Like this: add_post_meta($_POST['post_id'], 'users_touched_ids', $current_user->ID);
After that I have to display to user posts that wasn't "touched" by him. So I'm writing query like this:
[
'relation' => 'OR',
[
'key' => 'users_touched_ids',
'compare' => '!=',
'value' => $user_id
],
[
'key' => 'users_touched_ids',
'compare' => 'NOT EXISTS',
],
]
But it doesn't work. I'm getting all posts =(