Viewing 4 replies - 1 through 4 (of 4 total)
  • Just float it to the left targetting img.avatar which is a class assigned by default in get_avatar() and then apply some margins.

    Thread Starter SuperZambezi

    (@superzambezi)

    I’m sorry, I’m not very good at this. 😛 Can you guide me a bit further or push me a little more in the right direction?

    I’m confused about where “img.avatar” comes in.

    This is the <img /> produced by get_avatar()
    http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/pluggable.php#L1663

    Notice the class(es) assigned in the img tag, we need this class to target in CSS and float the img so that it’s aligned the way we want.

    In style.css ( of child theme, in case you are modifying the parent ) you need this bit of code

    img.avatar {float:left;margin-right:20px;}

    or

    div.title img.avatar {float:left;margin-right:20px;}

    Without the actual link to the site, it’s hard to come up with exact code, but this should give you the idea.

    Thread Starter SuperZambezi

    (@superzambezi)

    I seem to have managed to get it work by adding the “<div class=”alignleft”>” value:

    <div class="alignleft">
    <?php echo get_avatar( get_the_author_email(), '50' ); ?></div>

    Apologies for having to make you go threw the trouble to explain it all for me. I really appreciate the help! Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Position Author Image’ is closed to new replies.