Skip to content

Instantly share code, notes, and snippets.

@sunnyluthra
Created October 27, 2015 08:55
Show Gist options
  • Save sunnyluthra/3e620b103884754620ce to your computer and use it in GitHub Desktop.
Save sunnyluthra/3e620b103884754620ce to your computer and use it in GitHub Desktop.
Find wordpress user by meta values
<?php
$args = array(
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'skill',
'value' => 'php',
'compare' => '='
),
array(
'key' => 'skill',
'value' => 'nodejs',
'compare' => '='
)
)
);
$user_query = new WP_User_Query( $args );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment