Skip to content

Instantly share code, notes, and snippets.

@BeardedGinger
Last active May 4, 2016 19:03
Show Gist options
  • Save BeardedGinger/a15693a006aafa4a38cd2a429aab8ae9 to your computer and use it in GitHub Desktop.
Save BeardedGinger/a15693a006aafa4a38cd2a429aab8ae9 to your computer and use it in GitHub Desktop.
<?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