Created
August 15, 2012 17:56
-
-
Save wpsmith/3361965 to your computer and use it in GitHub Desktop.
Get all Users who are not authors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // prepare arguments | |
| $args = array( | |
| 'role' => 'author', | |
| 'query_id' => 'wps_not_author', | |
| 'meta_query' => array( | |
| array( | |
| 'key' => 'wpsand_capabilities', | |
| 'value' => '"author"', | |
| 'compare' => 'not like', | |
| ), | |
| ), | |
| ); | |
| // Create the WP_User_Query object | |
| $author_query = new WP_User_Query( $args ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment