Create a gist now

Instantly share code, notes, and snippets.

@BeardedGinger /user-query.php Secret
Last active May 4, 2016

<?php
$args = array(
'role' => 'Subscriber',
'fields' => 'ID'
);
$users = new WP_User_Query( $args );
// If we have users
if( $users->results ) {...}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment