public
Created

Co-Authors Plus bio presentation question from the WordPress.org forums

  • Download Gist
gistfile1.aw
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?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>';
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.