Query for user roles and their skills

There is one small issue. You have to user ‘IN’ instead of = because you want to check values with array $args = array( ‘role’ => ‘candidate’, ‘meta_query’ => array( ‘relation’ => ‘AND’, array( ‘key’ => ‘as_skills’, ‘value’ => array(‘skilla’,’skillx’,’skille’), ‘compare’ => ‘IN’ ), ), ); $test = get_users($args); echo “<pre>”; print_r($test); echo “</pre>”;

Meta Query returning empty array

As /u/Nicolai suggested in the question comment section, it’s always a good idea to add in post_status not only for validity but for speed purposes too. It could look like this: $practice_args = array( ‘post_type’ => ‘sf-location’, ‘post_status’ => ‘publish’, ‘meta_query’ => array( array( ‘key’ => ‘practice_id’, ‘value’ => $current_practice_id, ), ), );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)