How do I add an icon to an author bio?

Discussion in 'WordPress' started by JPMiddleton, Jul 11, 2011.

  1. #1
    JPMiddleton, Jul 11, 2011 IP
  2. Aman Arora

    Aman Arora Active Member

    Messages:
    100
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #2
    You can use this php code <?php echo get_avatar(get_the_author_email(),60);?> to echo out the avatar of author. It will use gravatar email to display the avatar.
     
    Aman Arora, Jul 12, 2011 IP
  3. JPMiddleton

    JPMiddleton Well-Known Member

    Messages:
    1,728
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    115
    #3
    Where would I use this code please?
     
    JPMiddleton, Jul 12, 2011 IP
  4. Aman Arora

    Aman Arora Active Member

    Messages:
    100
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #4
    add that code in page.php or maybe you will be having a about.php page. There will be a div like this <div class="author-overlay"></div>
    add that php code inside that div
     
    Aman Arora, Jul 13, 2011 IP
  5. JPMiddleton

    JPMiddleton Well-Known Member

    Messages:
    1,728
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    115
    #5
    So that would happen only when people are logged into WP? Is that correct?
     
    JPMiddleton, Jul 15, 2011 IP
  6. Aman Arora

    Aman Arora Active Member

    Messages:
    100
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #6
    No, the email address must be registered on gravatar.com and should have an image uploaded for the account
     
    Aman Arora, Jul 15, 2011 IP
  7. JPMiddleton

    JPMiddleton Well-Known Member

    Messages:
    1,728
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    115
    #7
    Thanks for the info'.
     
    JPMiddleton, Jul 15, 2011 IP