Hi,
I’m using the following code to show author box with element. With the same code one website working fine but another website not displaying author image. Please have a look.
<?php echo get_avatar( get_the_author_meta( ‘ID’ )); ?>
<h5 class=”author-title itemprop=”author” itemscope itemtype=”
http://schema.org/Person”>
<span itemprop=”name”><?php printf( esc_attr__( ‘About %s’, ‘the author’ ), get_the_author_meta( ‘display_name’) );?></span></h5>
<p class=”author-description”><?php echo wp_kses( get_the_author_meta( ‘description’ ), null ); ?></p>
I also use following css:
.author-box {
padding: 3%;
padding-bottom: 10px;
font-size: 0.9em;
background-color: #fff;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
border-radius: 5px;
box-shadow: rgba(23, 43, 99, .14) 0 7px 28px !important;
}
.author-box .avatar {
width: 250px;
height: auto;
margin-right: 30px;
}
h5.author-title {
margin-bottom: 0.1em;
font-weight: 600;
}
.author-description {
line-height: 1.6em
}
.author-links a {
margin-top: -1.5em;
font-size: 2em;
line-height: 2em;
float: left;
}
@media (max-width: 768px) {
.author-box {
padding: 20px;
padding-bottom: 30px;
margin-top: 100px;
flex-direction: column;
text-align: center;
}
.author-box .avatar {
margin-right: 0;
margin-bottom: 10px;
width: 100%;
margin-top: -35px;
}
.author-box .avatar img {
max-width: 100px;
}
.author-links a {
float: none;
align-self: center;
}
.author-description {
margin-bottom: -1.1em;
}
}