Viewing 9 replies - 1 through 9 (of 9 total)
  • I haven’t tried to use WP User Avatar with BuddyPress. I believe BuddyPress has its own custom avatar function, but you’ll have to make sure it’s enabled.

    Thread Starter umeaz

    (@umeaz)

    I have enabled it but can’t make it happen. Any sort of help would be greatly appreciated as I am newbie at web designing.

    I installed BuddyPress on a new copy of WordPress, copied over the bd-default theme and activated it. Then, I went to https://{yoursite}/wp-admin/admin.php?page=bp-settings and made sure “Allow registered members to upload avatars” was checked. Then I went to https://{yoursite}/members/{yourusername}/profile/change-avatar/ and was able to upload a new avatar. Are these the steps you’ve done? If you have and it still isn’t working, you might find an answer for why in the BuddyPress forum.

    You’re correct that WP User Avatar doesn’t work with BuddyPress, and since it has its own function, I don’t think it’s necessary to use my plugin.

    Thread Starter umeaz

    (@umeaz)

    Have already done all that. Actually i wanted to change the default avatar to a custom image. Anyways, the help is highly appreciated.
    If and when you plan to come up with such a plugin, I will be really grateful.

    If that’s the only function you need, you can try this other plugin and see if it works for you: https://www.ads-software.com/extend/plugins/add-new-default-avatar/

    If not, it’s a relatively simple function to set your default avatar. I can help you with that if the other plugin doesn’t work out for you.

    Thread Starter umeaz

    (@umeaz)

    This one also doesn’t work with buddypress. My bad!!

    This is a simple function that should work for you:

    function add_custom_default_avatar($avatar_defaults){
      $custom_avatar = 'https://{imageURL}';
      $avatar_defaults[$custom_avatar] = 'Custom Avatar';
      return $avatar_defaults;
    }
    add_filter('avatar_defaults', 'add_custom_default_avatar');

    You would paste this into the functions.php file in your theme folder. You can paste it at the very bottom of the file, or if there is a ?> at the bottom, paste the code just right before that.

    Replace the {imageURL} with the URL of the image you want to use. The avatar should appear in your Discussions settings now, and you can switch the Default Avatar to it.

    Thread Starter umeaz

    (@umeaz)

    This works till the point you said i.e. it shows up in the discussion settings. But even after I set it as the default avatar, it doesnt show up on the frontend.

    Can you create a user with a fake e-mail address? Use something that couldn’t possibly exist. For that user, can you see your custom avatar or do you still see an image from Gravatar?

    I am wondering if what you’re seeing is users that already have a Gravatar (even if it looks like the default avatar), which means your custom avatar wouldn’t override them.

    If this doesn’t work, then I’m not sure what else there is. Perhaps it is a BuddyPress issue.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Buddypress support’ is closed to new replies.