WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] After WP 3.5 new author does not show Gravatar or Bio (9 posts)

  1. Jaqueline
    Member
    Posted 1 year ago #

    Hello! Since my upgrade to WP 3.5, I added two new authors, but their gravatar/bio does not show. I have no idea what is going on!

    As you can see one example here: http://umamaedasarabias.com.br/2013/01/15/a-ilusao-dos-novos-comecos/ the author appears fine (as all the other authors).

    The new author: http://umamaedasarabias.com.br/2013/01/14/o-milagre/ Does not appear...
    Inside, in the "authors page" I can see the Gravatar photo and Bio with no problem.

    I really need help, as I tried EVERYTHING I could think of! Thanks!!

    http://wordpress.org/extend/plugins/co-authors-plus/

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

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

  3. Jaqueline
    Member
    Posted 1 year ago #

    Sure!

    <!--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 -->
    </div>
    <?php endforeach; ?>
    </div> <!-- .author-inner -->
    </div> <!-- .author-shortcodes -->

    Thank you!

  4. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Ok. Instead of:

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

    You should do:

    <?php $userdata = $coauthor; ?>

  5. Jaqueline
    Member
    Posted 1 year ago #

    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: http://umamaedasarabias.com.br/2013/01/14/o-milagre/

    Anyways, thanks a lot for the quick reply.

  6. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

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

  7. Jaqueline
    Member
    Posted 1 year ago #

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

  8. nemanja.radevic
    Member
    Posted 1 year ago #

    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

  9. nemanja.radevic
    Member
    Posted 1 year ago #

    <?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>
    </div>
    <?php endforeach; ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic