Example 1 — Basic list
Print a simple author list inside a <ul>.
<ul>
<?php wp_list_authors(); ?>
</ul> How It Works
- The function prints only the
<li>items. - You add the
<ul>yourself. - Each name links to the author archive.

In WordPress, wp_list_authors() lists the authors of your site. Each author name links to their archive page.
By default it prints list items (<li>). Put the call inside a <ul>. Pass an array of options to show post counts, hide empty authors, or return the HTML.
Call it with no arguments, or pass an array of options.
wp_list_authors();
wp_list_authors( array(
'optioncount' => true,
'exclude_admin' => false,
) ); | Call | What it does |
|---|---|
wp_list_authors() | Prints list items for all authors who have posts. |
wp_list_authors( $args ) | Prints the list with your options. |
You can call it in a sidebar, a footer, or an "Our team" page template.
wp_list_authors( string|array $args = '' ): string|void | Parameter | Description |
|---|---|
$args | Optional. An array of options. See the table below. |
| Argument | What it does |
|---|---|
optioncount | Show the post count after each name. Default is false. |
exclude_admin | Hide the user named admin. Default is true. |
hide_empty | Hide authors with no posts. Default is true. |
show_fullname | Show first and last name instead of the display name. |
style | list gives list items. none gives a comma separated line. |
echo | true prints the HTML. false returns it. |
| Return Value | Description |
|---|---|
| void (prints to the page) | When echo is true, which is the default, the list is printed. |
| string | When echo is false, the list HTML is returned. |
Three short theme examples. Each one has a sample output.
Print a simple author list inside a <ul>.
<ul>
<?php wp_list_authors(); ?>
</ul> <li> items.<ul> yourself.Show the number of posts and use first and last names.
<ul>
<?php
wp_list_authors( array(
'optioncount' => true,
'show_fullname' => true,
) );
?>
</ul> optioncount adds the post count in brackets.show_fullname uses the first and last name.Return the HTML and print it inside a sentence.
<?php
$authors = wp_list_authors( array(
'style' => 'none',
'echo' => false,
) );
echo '<p>Written by: ' . $authors . '</p>';
?> style => none gives links separated by commas.echo => false returns the HTML.Browse all ten WordPress author functions in one table.
9 people found this page helpful