I have this call:
get_users('meta_key=main_feature&value=yes');
but the query is also returning users with the meta key ‘featured’ set to yes as well. I have a plugin that allows me to check all the user meta and have confirmed that the meta key for users that shouldn’t be showing up is empty.
Is there something I’m doing wrong here?
As the WordPress codex says your arguments for the
get_users
function should be an array.So your query should look somethin like this:
Try to do something like below :