Site logo

Archived topic

Help with Autor Box

4 replies · Started by Marius on April 29, 2019

Viewing posts 1–5 of 5

So, the plugin that was mentioned, doesn´t seem to work. Also on user profile backened, i can see no gravatar, although i have tried both methods to upload and choose one.

Is it possible to take an pic from the library without any plugin?

And how do i get a coloured background for my author box?

Hi there,

edit this line of the PHP:

<div class="avatar"><?php echo get_avatar( get_the_author_meta( $author_id )); ?></div>

This time we'll replace the PHP with an image like so:

<div class="avatar"><img src="full_url_to_your_media_attachment" width="50" height="50"></div>

To add a colored background look for this CSS and include the background-color property i have adder here:

.author-box {
    padding: 4%;
    margin-top: 60px;
    font-size: .8em;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    background-color: #ccc; /* Adjust color to suit */
}

Hi David,

perfect, that works well. And even better, without a nasty plugin. Thanks a lot.

Awesome - glad to be of help :)

This archived topic is closed to new replies.