I'm currently struggling with implementing a feature for wordpress site. I would like to get the count of all users which have the key
is_photographer='true' (located in
wp_usermeta. How could that be achieved? I've been searching through the documentation, but I couldn't find an proper example.
$users_sent_to_admin = new WP_User_Query(array( 'meta_query' => array( array( 'key' => 'pending_approval', 'value' => 'true', 'compare' => '='), array( 'key' => 'is_photographer', 'value' => 'true', 'compare' => '=' ), ) )); $users_sent_to_admin = new WP_Query($users_sent_to_admin);