ign_posted_by()

Echoes some html that holds links with the author image, authors name, and the authors description. You can easily edit the output in the template-tags file. Must be used within the loop.

File: inc/template-tags.php

function ign_posted_by() {
	$author_id          = get_the_author_meta( 'ID' );
	$author_link        = esc_url( get_author_posts_url( $author_id ) );
	$author_image       = '<a href="' . $author_link . '" class="author-avatar">' . get_avatar( $author_id, 50 ) . '</a>';
	$author_name        = sprintf( __( '%s by %s', 'ignition' ), '<a href="' . $author_link . '" class="author-name"><span class="byline">', '</span>' . get_the_author() . '</a>' );
	$author_description = '<div class="author-description">' . get_the_author_meta( 'description' ) . '</div>';

	echo '<div class="posted-by">' . $author_image . '<div class="author-info">' . $author_name . $author_description . '</div></div>';

}