wp_list_authors() WP 1.0
List all the authors of the site, with several options available.
No Hooks.
Return
null/String. Void if 'echo' argument is true, list of authors if 'echo' is false.
Usage
wp_list_authors( $args );
- $args(string/array)
Array or string of default arguments.
-
orderby(string)
How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered', 'user_nicename', 'user_email', 'user_url', 'user_registered', 'name', 'display_name', 'post_count', 'ID', 'meta_value', 'user_login'.
Default: 'name' -
order(string)
Sorting direction for $orderby. Accepts 'ASC', 'DESC'.
Default: 'ASC' -
number(int)
Maximum authors to return or display.
Default: empty (all authors) -
optioncount(true/false)
Show the count in parenthesis next to the author's name.
Default: false -
exclude_admin(true/false)
Whether to exclude the 'admin' account, if it exists.
Default: true -
show_fullname(true/false)
Whether to show the author's full name.
Default: false -
hide_empty(true/false)
Whether to hide any authors with no posts.
Default: true -
feed(string)
If not empty, show a link to the author's feed and use this text as the alt parameter of the link.
Default: '' -
feed_image(string)
If not empty, show a link to the author's feed and use this image URL as clickable anchor.
Default: '' -
feed_type(string)
The feed type to link to. Possible values include 'rss2', 'atom'.
Default: value of get_default_feed() -
echo(true/false)
Whether to output the result or instead return it.
Default: true -
style(string)
If 'list', each author is wrapped in an <li> element, otherwise the authors will be separated by commas. -
html(true/false)
Whether to list the items in HTML form or plaintext.
Default: true -
exclude(array/string)
Array or comma/space-separated list of author IDs to exclude.
Default: '' - include(array/string)
Array or comma/space-separated list of author IDs to include.
Default: ''
Default: ''
-
Notes
- Global. wpdb. $wpdb WordPress database abstraction object.
Changelog
Since 1.2.0 | Introduced. |
Code of wp_list_authors() wp list authors WP 5.6
Related Functions
From tag: List (wp_list)
More from category: Other
- auth_redirect()
- count_many_users_posts()
- count_user_posts()
- count_users()
- email_exists()
- get_author_posts_url()
- get_current_user_id()
- get_editable_roles()
- get_the_author()