I have created an Author box using these codes.
Added a Hook at after_content:
<div class="author-box">
<?php
global $post;
$author_id = $post->post_author;
?>
<div class="avatar"><?php echo get_avatar( get_the_author_meta( $author_id )); ?></div>
<h5 class="author-title"><?php printf( esc_attr__( 'About %s', 'the author' ), get_the_author_meta( 'display_name') );?></h5>
<div class="author-summary">
<p class="author-description"><?php echo wp_kses( get_the_author_meta( 'description' ), null ); ?></p>
<div class="author-links">
<a>" title="Read more">
...
</a>
</div>
</div>
</div>
and this CSS:
.author-links a {
font-size: 3em;
line-height: 0.5em;
float: right;
}
.author-box {
padding: 4%;
margin-top: 60px;
font-size: 0.8em;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.author-box .avatar {
width: 30px;
border-radius: 100%;
margin-right: 20px;
}
h5.author-title {
margin-bottom: 0.5em;
}
Everything is working fine except for Gravatar images of the author.
Please help me with this.