Created
March 26, 2014 03:03
-
-
Save Perun/9776235 to your computer and use it in GitHub Desktop.
Listet bestimmte Autoren auf einer Unterseite inkl. Profilfoto auf. Siehe http://www.perun.net/2014/03/26/wordpress-autoren-auf-einer-separaten-seite-mit-profilbildern-auflisten/
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
<?php | |
function contributors() { | |
global $wpdb; | |
$authors = $wpdb->get_results("SELECT ID, user_nicename from $wpdb->users WHERE display_name != 'Vorname Name' AND display_name != 'Vorname Name2' ORDER BY display_name"); | |
foreach ($authors as $author ) { | |
echo "<div style=\"float:left; margin: 0 15px 3px 0;\">"; | |
echo get_avatar($author->ID); | |
echo "</div>"; | |
echo "<div style=\"margin-left: 115px;\">"; | |
echo "<h3>"; | |
echo the_author_meta('display_name', $author->ID); | |
echo "</h3>"; | |
echo "<p>"; | |
echo the_author_meta('description', $author->ID); | |
echo "</p>"; | |
echo "<p><a href=\""; | |
echo get_bloginfo('url'); | |
echo "/author/"; | |
echo the_author_meta('user_nicename', $author->ID); | |
echo "/\">Blog-Artikel von "; | |
echo the_author_meta('display_name', $author->ID); | |
echo "</a></p>"; | |
echo "</div>"; | |
echo "<br style='clear: both;' />"; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment