Co-Authors Plus bio presentation question from the WordPress.org forums
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 | |
/** | |
* Co-Authors Plus bio presentation question from the WordPress.org forums | |
* Untested code for demonstration purposes | |
* | |
* @see http://wordpress.org/support/topic/plugin-co-authors-plus-create-a-separate-co-author-section | |
*/ | |
function capx_display_coauthor_bios() { | |
$coauthors = get_coauthors(); | |
foreach( $coauthors as $key => $coauthor ) { | |
echo '<div class="dash"></div>'; | |
if ( $key == 0 ) | |
echo '<h3>About the Illustrator</h3>'; | |
else | |
echo '<h3>About the Contributor</h3>'; | |
echo '<div class="author">'; | |
echo get_avatar( $coauthor->user_email, '80' ); | |
echo '<p>' . get_userdata( $coauthor->ID )->user_description . '</p>'; | |
echo '</div>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment