Link Author Avatar To BuddyPress Members Profile Page

This code adds the author avatar in the entry header and links the avatar image to the members profile page.

You can change the hook to change the location you want to display the avatar.

The code works in conjunction with BuddyPress and also enables you to link the members avatar to any page in BuddyPress simply by including the slug in the code.

If you want to change the link, you can simply change the value for the $profile_page variable.

Here’s the code for logged in members:

Related Tutorials


Comments

4 responses to “Link Author Avatar To BuddyPress Members Profile Page”

  1. jmelee1221 Avatar
    jmelee1221

    Do you know any reason that a BuddyPress profile picture would show up blurry when linked to the Author Page? Like this >> http://weheartthis.com/author/stef/

    1. Brad Dalton Avatar
      Brad Dalton

      I would make sure the original is exactly the same size before uploading it. Looks like its smaller and being stretched using CSS.

      1. jmelee1221 Avatar
        jmelee1221

        Thats what is weird. The image is way bigger than the box and it keeps loading blurry when in the author part. When I deactivate BuddyPress it is clear, so I am not sure anymore.

        1. Brad Dalton Avatar
          Brad Dalton

          BP have cropped the image to 50px and then stretched it. Thats why its blurry.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.