andrewgable
Member
Posted 2 months ago #
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.
My WordPress Site
http://wordpress.org/extend/plugins/co-authors-plus/
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.
andrewgable
Member
Posted 2 months ago #
Sweet! A for loop in PHP, didn't know I could do that! Thanks for the help. One last little part, this guy. Code. Would I just have an something like Code 2? Because it just does not seem to be pulling the link correctly, You cannot "Click" it. Test Page
Thanks!
That looks like a CSS issue. Your marT30 div is on top of the author bios.
andrewgable
Member
Posted 2 months ago #
Ahh yes, thanks for your help. Love the plugin!
nemanja.radevic
Member
Posted 1 month 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
nemanja.radevic
Member
Posted 1 month ago #
so basically the coauthor->description; to be excerpt with lets say 200 characters
and the coauthor->user_url;
to be coauthors_posts_links