[Resolved] [Plugin: Groups] Query API
Hello and thank you for this plugin. I’m looking for direction on using the API.
I’m creating a plugin to let users search for other users on the WP front end. I’d like to limit the search query to specific Groups.
Can I use WP_User_Query to find only users in Groups X? Or does the Groups API offer some other way to accomplish this?
$args = array( // search by Group // ??? 'group' => 'X' // Order by 'orderby' => 'first_name', // check for two meta_values 'meta_query' => array( array( // by default compare is '=' 'key' => 'active', 'value' => '1', ), // add more )); $wp_user_query = new WP_User_Query($args); // Get the results $qresults = $wp_user_query->get_results();
- The topic ‘[Resolved] [Plugin: Groups] Query API’ is closed to new replies.