[Resolved] Author Avatar not showing image

Home Forums Support [Resolved] Author Avatar not showing image

Home Forums Support Author Avatar not showing image

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1221686
    Khaled

    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”&gt;
    <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;
    }
    }

    #1222052
    David
    Staff
    Customer Support

    Hi there,

    couple of things that come to mind:

    1. Plugin conflict – test by disabling other plugins.
    2. Is Avatar Display checked in Dashboard > Settings > Discussion

    #1222065
    Khaled

    How silly of me!!! I was looking to turn on avatar under user profile. I’m sure that is the case.
    Thanks!

    #1222275
    David
    Staff
    Customer Support

    You’re welcome

    #1310569
    Khaled

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.