Post not showing up under the all of the coauthor's posts.
-
Hello I was wondering if anybody could help me out. My main problem is that posts that have two authors are only showing up under one author currently. For my main problem I have placed the code in a pastebin. Thanks ahead for helping me out.
A secondary issue is that the coauthors names are being duplicated like the two examples below. I am using the coauthors() function Examples of the code I am using to get these are.
Example One:
LindsayThis entry was contributed by Lindsay, October 26th, 2015 at 1:04 pm and is filed under Capacity Building, Community Partnerships, Diversity.
Example Two:
This entry was contributed by Lindsay and LindsayLindsay and Lindsay, October 26th, 2015 at 1:04 pm and is filed under Capacity Building, Community Partnerships, Diversity.
Code Example:
<?php if( function_exists( 'coauthors' ) ) : echo '<span class="post-author-meta">This entry was ' . __( 'contributed by', 'reverie' ) coauthors() . ', ' . get_the_time( 'F jS, Y \a\\t g:i a' ); else : echo '<span class="post-author-meta">This entry was ' . __( 'contributed by', 'reverie' ) get_the_author_meta( 'display_name' ) . ', ' . get_the_time( 'F jS, Y \a\\t g:i a' ); endif; $coauthors = get_coauthors(); foreach( $coauthors as $coauthor ): $userdata = get_userdata( $coauthor->ID ); ?> <div class="entry-author panel contributor-title"> <div class="row"> <div class="large-3 columns"> <div class="img"><?php echo get_avatar( $userdata->user_email, 95 ); ?></div> <div class="name"><a href="/contributors"><?php echo $userdata->display_name; ?></a></div> </div> <div class="large-9 columns"> <p class="cover-description"><?php echo $userdata->user_description; ?></p> </div> </div> </div> <?php endforeach;?>
- The topic ‘Post not showing up under the all of the coauthor's posts.’ is closed to new replies.