WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] How to display single Co-Authors? (2 posts)

  1. rob_st_82
    Member
    Posted 8 months ago #

    This Plugin is great for adding authors that aren't registered users to your WordPress blog.

    In my articles that do have multiple authors, I would like to show them all with

    1. Avatar
    2. Name (display name)
    3. Bio

    I've coded so far:

    <?php $coauthors = get_coauthors();
    		foreach( $coauthors as $coauthor ): ?>
    			<div class="entry-author co-author">
    				<?php /* placeholder avatar */ ?>
    				<h3 class="author vcard"><span class="fn"><?php coauthors_posts_links(); ?></span></h3>
    				<p class="author-bio"><?php get_the_coauthor_meta( 'description' );?></p>
    				<div class="clear"></div>
    			</div><!-- .entry-author co-author -->
    		<?php endforeach;

    into my functions.php, the function would be called in the single.php

    I don't figure out how to use single-author functions like coauthors_posts_links_single(); from the template_tags.php Somehow I can only use coauthors_posts_links(); and coauthors_posts(); - which will always show author 1 and author 2.

    Has anyone an idea or suggestion?

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

  2. rob_st_82
    Member
    Posted 8 months ago #

    I've got a working solution: http://pastebin.com/GgJNcswV

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.