(+84) 463.28.7979

Adding author image in Multi Post page – Theme Atahualpa


If you are running a multi author blog then you might want to put the authors image beside the post. I got few mails from my readers asking how did I insert Author’s Image beside Post title in multi post page in Atahualpa. So here is how I did that for my site Letusbuzz.

Requirements

1. Atahualpa Theme for wordpress

2. Gravatar Plugin for wordpress

How to

1. Activate the Gravatar plugin.

2. Login to your website using the Administrator account

3. From Dashboard goto Appearance > Atahualpa Theme Options > Style & Edit CENTRE COLUMN

4. Goto The LOOP section

5. Search the following code

1
<?php bfa_post_headline('<div>','</div>'); ?>
6. Add the below code just above this line
1
2
3
<?php if ( function_exists('get_avatar') && !is_single() && !is_page()){
echo '<div id="mpavatar">'.get_avatar( get_the_author_email(), ‘16′ ).'</div>' ;
} ?>

7. Save Changes

Styling and positioning the image using CSS

1. Goto Atahualpa Theme Options > Add HTML/CSS insert

2. Add the following code CSS Inserts

1
2
3
4
5
6
7
8
9
div#mpavatar img{
border:1px solid #AAAAAA;
display:block;
float:left;
height:62px;
margin:-8px 4px 0;
padding:2px;
width:62px;
}

3. Save changes.

Refresh your webpage and you will see the authors image beside the Post title in the multi post page of your website

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>