• Hey. I was wondering, how can I add a picture/avatar by my posts? So for example. If I was to post something by my post on the left there will be an avatar. How can I do that? What do I need to do? Probably this question has been asked many times, but I did a search and I couldn’t find anything. So if anyone could point in the right direction that would be great. Thanks in advance…
    nir0c

Viewing 2 replies - 1 through 2 (of 2 total)
  • Well basically you would use the same system as some have suggested to display images automagically.
    First you would obviously need to add the appropriate CSS to your stylesheet, probably a float of some kind. Then hard code its placement into your template, that would be my suggestion at least.
    Then pick the image/avatars you are going to use, and name them exactly as each handle/identity on your site(authors).
    Then dump them all into a folder, for this example lets assume you store all your images in a folder named gfx, and inside that folder you create another folder titled avatars. So now your relative URL for the avatars would be gfx/avatars/.
    where ever you have coded in the avatar float, insert this code:

    <div class="mysuperfloat">
    <img src="gfx/avatars/<?php the_author() ?>.gif" alt="my goofy pic" />
    </div>

    I haven’t tested this yet, just off the top of my head. I will try and test this out later today and check back in. At the least this is a place to start.
    Remember though the images need to be named exactly as the coresponding author’s nickname, or it will bork.
    Hope this helps
    Jesuit

    BTW, this technique is described in the readme. Search for ‘the_author_login()’.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Picture by post?’ is closed to new replies.