Group users by meta field, with name of meta field as group title

i need to return/echo the name of the department/location for each group of employees That is actually a generic PHP/programming question, nonetheless, if you mean an output which looks like so: Location/Department Name – Employee/user – Employee/user – Employee/user Location/Department Name – Employee/user – Employee/user Then here’s one way of accomplishing that: Add this above/before … Read more

Can’t display user bio

I’m not certain as I have no experience of ACADP, but I suspect your problem is the function, acadp_get_user_slug. What does it do? Likely not what you think! As the following will work for the user admim: function display_user_bio() { $user_slug = ‘admin’; if($user_slug != ”) { $user = get_user_by(‘login’, $user_slug); if($user) { return get_the_author_meta(‘description’, … Read more

Query a meta key using an array of values where the database value is a string

You could use multiple meta clauses in your WP_User_Query, along with a LIKE comparison. Something like $args = array( ‘role’ => ‘member’, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘specializations’, ‘value’ => ‘doctor’, ‘compare’ => ‘LIKE’, ), array( ‘key’ => ‘specializations’, ‘value’ => ‘researcher’, ‘compare’ => ‘LIKE’, ), ), ); $found_users = new … Read more