[Resolved] Adding co-authors Bio, Avatar & Link
So I would like to have two author “blocks” of information, I’m having trouble calling the second author’s information. Here is a photo of what one author “block” would look like. Image. Here is the PHP file assosiated with my template Code.
How would you call to get the second authors photo, bio, and link to their page in that nice div?
Thanks for the help.
You’ll need something like this instead:
<?php foreach( get_coauthors() as $coauthor ) : ?> <div id="authorinfo" class="columns alpha omega marT30 marB20"> <a href="<?php echo $coauthor->user_url; ?>"><?php echo get_avatar( $coauthor->user_email, '80' ); ?></a> <h5 class="marB10"><?php _e('By', 'contempo'); ?>: <a href="<?php echo $coauthor->user_url; ?>"><?php echo $coauthor->display_name; ?></a></h5> <p><?php echo $coauthor->description; ?></p> <div class="clear"></div> </div> <?php endforeach; ?>
Hope this helps.
That looks like a CSS issue. Your marT30 div is on top of the author bios.
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
- The topic ‘[Resolved] Adding co-authors Bio, Avatar & Link’ is closed to new replies.