A shortcode for displaying paginated lists of users.
Other plugins output paginated lists of users, but I needed to be able to customize and style this list to fit my theme. So I created this plugin to use templates that can be overridden and customized by theme developers.
To customize any of the templates, copy the file from the plugin's "templates" folder to your themes "simple-user-listing" folder.
Place this shortcode anywhere you'd like to display a full list of all your blog's users.
By default the plugin will print out the users based on the "Posts per Page" setting under Settings->Reading, but this and many other settings can be changed via the shortcode's parameters.
Simple User Listing supports most of the parameters of the
WP_User_Query class as parameters for the shortcode. For example you can pass it a role defining which type of users you'd like to list. You can also adjust the number of users displayed per page. Roles must be in lowercase.
[userlist role="author" number="5"]
As of version 1.2 you can now sort the user list by and of the sort parameters supported by
WP_User_Query(). For example, the following would list your users based on number of posts written, with the highest first.
[userlist orderby="post_count" order="DESC"]
As of version 1.4 you can now list users by a meta key. Be careful with this as this is not exactly an efficient query.
[userlist meta_key="foo" meta_value="widgets"]
As of version 1.4.2 you can now include and exclude users with a comma separated list of IDs.
The full list of supported parameters (shown with default value) is:
'query_id' => 'simple_user_listing', 'role' => '', 'include' => '', 'exclude' => '', 'blog_id' => '', 'number' => get_option( 'posts_per_page', 10 ), 'order' => 'ASC', 'orderby' => 'login', 'meta_key' => '', 'meta_value' => '', 'meta_compare' => '=', 'meta_type' => 'CHAR', 'count_total' => true,
For advanced implementations you might want to read the WP Codex reference on WP_User_Query.
Please report any bugs, errors, warnings, code problems to Github
Requires: 3.8 or higher
Compatible up to: 4.2.1
Last Updated: 2015-4-24
Active Installs: 1,000+
0 of 2 support threads in the last two months have been resolved.
Got something to say? Need help?