Trying to display multiple author bios with Author Bio Box and Co-Authors Plus
-
Hi there,
I’m trying to tweak the code of the Author Bio Box plugin to loop through multiple authors added using Co-Author Plus and display more than one bio box below each post.
I’m rather a wp-coding newbie but my hacking thus far has lead to this section of code – it’s where the html is generated for the author box itself.
<?php $coauthors = get_coauthors(); ?> <?php foreach( $coauthors as $coauthor ): ?> $html = '<div id="author-bio-box" style="' . $styles . '">'; $html .= '<h3><a style="color: ' . $settings['title_color'] . ';" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( __( 'All posts by', 'authorbiobox' ) . ' ' . get_the_author() ) .'" rel="author">' . get_the_author() . '</a></h3>'; $html .= '<div class="bio-gravatar">' . get_avatar( get_the_author_meta('ID'), $gravatar ) . '</div>'; foreach ( $social as $key => $value ) { if ( ! empty( $value ) ) $html .= '<a target="_blank" href="' . esc_url( $value ) . '" class="bio-icon bio-icon-' . $key . '"></a>'; } $html .= '<p class="bio-description">' . apply_filters( 'authorbiobox_author_description', get_the_author_meta( 'description') ) . '</p>'; $html .= '</div>'; <?php endforeach; ?>
I’m hoping this is the right place for the co-author loop but I’m having trouble working out where I need to put $coauthor bits – I’m assuming anything with “get_” in it?
Any help here would be much appreciated 🙂
Thanks,
-Angelya
http://www.teainthetreetops.com
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Trying to display multiple author bios with Author Bio Box and Co-Authors Plus’ is closed to new replies.