Support » Plugin: Co-Authors Plus » After WP 3.5 new author does not show Gravatar or Bio

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Daniel Bachhuber


    Can you share the code you’re using to append the Gravatar photo and bio?


    <!--Display Author Code -->
    <div class='author-shortcodes'>
    <div class='author-inner'>
    <?php if ( function_exists( 'coauthors_posts_links' ) ) { coauthors_posts_links(); } else { the_author_posts_link(); } ?>
    <?php $coauthors = get_coauthors(); ?>
    <?php foreach( $coauthors as $coauthor ): ?>
    <div class="authbio">
    <?php $userdata = get_userdata( $coauthor->ID ); ?>
    <div class='author-image'>
    <?php if (function_exists('get_avatar')) { echo get_avatar( $userdata->user_email, '57' ); } ?>
    			<div class='author-overlay'></div>
    		</div> <!-- .author-image -->
    <div class='author-info'>
    <p><?php if ( $userdata->user_description ) echo $userdata->user_description; ?></p>
    </div> <!-- .author-info -->
    <?php endforeach; ?>
    </div> <!-- .author-inner -->
    </div> <!-- .author-shortcodes -->

    Thank you!

    Plugin Author Daniel Bachhuber


    Ok. Instead of:

    <?php $userdata = get_userdata( $coauthor->ID ); ?>

    You should do:

    <?php $userdata = $coauthor; ?>

    Good Morning Daniel!

    It fixed the Gravatar, but still not the bio. Same problem: old users have the bio published, but not the new ones like this:

    Anyways, thanks a lot for the quick reply.

    Plugin Author Daniel Bachhuber


    Oh. Instead of $userdata->user_description, try doing $userdata->description

    Daniel, it worked!! Many thanks!! =)



    one question on this subject! this is an amazing thing

    i would like to do the excact same thing and add more to the code

    a link to the authors profile where will be listed all the post he/she wrote instead of going to the website of the author

    and also if possible an excerpt of the bio in the code above instead of all the bio? because there might be authors with big bio

    Please help out! I will reward with a nice donation



    <?php foreach( get_coauthors() as $coauthor ) : ?>
    <div id=”authorinfo” class=”columns alpha omega marT30 marB20″>
    user_url; ?>”><?php echo get_avatar( $coauthor->user_email, ’80’ ); ?>
    <h5 class=”marB10″><?php _e(‘By’, ‘contempo’); ?>: user_url; ?>”><?php echo $coauthor->display_name; ?></h5>
    <p><?php echo $coauthor->description; ?></p>
    <div class=”clear”></div>
    <?php endforeach; ?>

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘After WP 3.5 new author does not show Gravatar or Bio’ is closed to new replies.