solid-pixel
8/27/2017 - 9:25 PM

Display Multiple Authors in Author Box

Display Multiple Authors in Author Box

<div id="author-info">

	<?php while($i->iterate()){ ?>

	<div id="author-image">
		<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>">
			<?php
				$author_id = get_the_author_meta('ID');
				$author_image = get_field('author_image', 'user_' . $author_id );
				$size = 'full';
				if( $author_image ) {
					echo wp_get_attachment_image( $author_image, $size );
				}
			?>
		</a>
	</div>

	<div id="author-details">
		<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>" rel="nofollow" target="_blank">
			<?php the_author_meta( 'first_name' );?>
			<?php the_author_meta( 'last_name' );?>
		</a>
		<a href="mailto:<?php the_author_meta( 'user_email' );?>">
			<?php the_author_meta( 'user_email' );?>
		</a>
	</div>

	<?php } ?>
</div>
<!--Author Info-->

Requires Co-Authors Plus WordPress Plugin and ACF