Created
October 27, 2015 08:55
-
-
Save sunnyluthra/3e620b103884754620ce to your computer and use it in GitHub Desktop.
Find wordpress user by meta values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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