Skip to content

Instantly share code, notes, and snippets.

@hedcler
Created September 27, 2012 21:21
Show Gist options
  • Save hedcler/3796543 to your computer and use it in GitHub Desktop.
Save hedcler/3796543 to your computer and use it in GitHub Desktop.
Wordpress_Listar_Autores
<?
function list_collaborators() {
global $wpdb;
$authors = $wpdb->get_results("SELECT ID, user_nicename from $wpdb->users ORDER BY display_name");
foreach($authors as $author) {
$author_name = get_the_author_meta('display_name', $author->ID);
echo "<li>" .
"<a href=\"".get_author_posts_url( $author->ID, $author_name ). "\">" .
$author_name .
"</a>" .
"</li>";
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment