Created
September 27, 2012 21:21
-
-
Save hedcler/3796543 to your computer and use it in GitHub Desktop.
Wordpress_Listar_Autores
This file contains 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
<? | |
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