Support only during business hours : Monday to friday, from 8:30 am – 5:30 pm CEST

Due to the decrease in our staff due to vacations, our response time may be longer.

Be sure we're doing our best to manage your topic as soon as possible.

how to I change the default avatar guy?

This topic is resolved
Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • meee
    Participant
    • 23 Topics
    • 54 Posts
    @2tara

    how to I change the default avatar guy? If I go to setting – discussions they all show the same picture. I would like to get rid of crea default avatar.

    Andrea
    Participant
    • 26 Topics
    • 133 Posts
    @youfriend

    Hi @2tara

    Ive used the child theme for change the avatars on cera-child\assets\images\avatars

    I think is the better solution without plugins and codes

    Themosaurusrex
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2048 Posts
    @themosaurusrex

    Hi @2tara,

    We are aware of this limitation with the default avatars and we’re planning on addressing this by making it editable in the Customizer.


    @youfriend
    is correct, this is the easiest way to do it. If you wish to know more about child themes, please also read the following post:

    Creating a Child Theme

    Otherwise, if you wish to use code to change this, simply add the following snippet to your website:

    /**
      * Changing the default Cera avatars.
      */
    if ( function_exists( 'buddypress' ) ) {
       if ( ! class_exists( 'Youzer' ) ) {
          define( 'BP_AVATAR_DEFAULT',            'YOURWEBSITE/SOME-DIRECTORIES/user-avatar.png' );
          define( 'BP_AVATAR_DEFAULT_THUMB',      'YOURWEBSITE/SOME-DIRECTORIES/user-avatar-thumb.png' );
       }
    }

    To add this code snippet to your site, we recommend that you use a the Code Snippets plugin (https://wordpress.org/plugins/code-snippets/). If you have never activated this plugin, please read the following post:

    Adding Custom PHP Without Changing Your Child Theme

    Please also note that we don’t provide any theme customization. So, you shouldn’t expect other snippets from us unless it’s to fix an issue stemming from our own codebase. We always try our best to help theme users whenever we can and only provide code snippets out of courtesy to prevent them from waiting for the next update.

    Regards,

    Andrea
    Participant
    • 26 Topics
    • 133 Posts
    @youfriend

    wow, i didn’t know Code Snippets plugin its amazing. Ty

    Themosaurusrex
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2048 Posts
    @themosaurusrex

    You’re welcome @youfriend! This is an awesome plugin if do not wish to build a child theme for minor changes. I’m glad to read that this recommendation might help you!

    Andrea
    Participant
    • 26 Topics
    • 133 Posts
    @youfriend

    Hey @themosaurusrex

    this code for default avatar profile work fine, and now i use code snippet instead childtheme. Wat about code for groups avatar default?

    Themosaurusrex
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2048 Posts
    @themosaurusrex

    @youfriend Could you try to add the following snippet please?

    if ( function_exists( 'buddypress' ) ) {
    	/**
    	 * Change the default BP group avatar image.
    	 *
    	 * @param  string $avatar The URL for the default BP group avatar image.
    	 * @param  array $params The array of params for the default BP group avatar image.
    	 *
    	 * @return string         The updated URL for the BP group avatar image.
    	 */
    	function cera_custom_change_default_avatar_group( $avatar, $params ) {
    		$avatar = 'YOURWEBSITE/SOME-DIRECTORIES/user-group.png';
    		return $avatar;
    	}
    	add_filter( 'bp_core_default_avatar_group', 'cera_custom_change_default_avatar_group', 10, 2 );
    }

    Thank you.

    Andrea
    Participant
    • 26 Topics
    • 133 Posts
    @youfriend

    Not work 🙁

    Also BP_AVATAR_DEFAULT_THUMB have an issue on “widget members” load and when im try to navigate pages on members directory.

    Themosaurusrex
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2048 Posts
    @themosaurusrex

    @youfriend I’m sorry, the code priority was way too high and thus the code was running before theme. Could replace the snippet from https://support.themosaurus.com/forums/topic/how-to-i-change-the-default-avatar-guy/#post-13217

    With the following:

    if ( function_exists( 'buddypress' ) ) {
    	/**
    	 * Change the default BP group avatar image.
    	 *
    	 * @param  string $avatar The URL for the default BP group avatar image.
    	 * @param  array $params The array of params for the default BP group avatar image.
    	 *
    	 * @return string         The updated URL for the BP group avatar image.
    	 */
    	function cera_custom_change_default_avatar_group( $avatar, $params ) {
    		$avatar = 'https://www.gravatar.com/avatar/?d=mp&s=72';
    		return $avatar;
    	}
    	add_filter( 'bp_core_default_avatar_group', 'cera_custom_change_default_avatar_group', 1000, 2 );
    }

    It do the trick. (Please see attached.)

    Themosaurusrex
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2048 Posts
    @themosaurusrex

    @youfriend Could post a screenshot of your widgets please? This change is the same as those made by Grimlock for BuddyPress, it should work in both cases. Thank you.

    Andrea
    Participant
    • 26 Topics
    • 133 Posts
    @youfriend

    awwnn 😀 , now the code work perfectly for groups. TY

    As you can see from the screens, when there is a loading process from page navigation, the avatar set to the code does not work in members directory page.
    Same on widget members.

    Themosaurusrex
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2048 Posts
    @themosaurusrex

    @youfriend Thank you very much for your precious feedback. My understanding is that BuddyPress is bypassing our snippet each time it uses AJAX to load new data from your server.

    We will investigate further to find from where this issue is coming from.

    We will be back to you ASAP.

    Thank you for your patience.

    Themosaurusrex
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2048 Posts
    @themosaurusrex

    Just for know if possible, or i’ll back with child-theme. My users asked me why this strange avatar appear sometimes ?


    @youfriend
    Very sorry about this. I’m glad to read that they’re keeping their sense of humor. 😀

    This should be solved very soon(ish). Grimlock for BuddyPress v 1.3.5 will be release next week. This has been included in the task list for v 1.3.6.

    Hopefully, you won’t wait for too long now.

    Andrea
    Participant
    • 26 Topics
    • 133 Posts
    @youfriend

    Cool! <3 I’m Lovin’ It

    Andrea
    Participant
    • 26 Topics
    • 133 Posts
    @youfriend

    we are on 1.3.7, right? but not solved

    Themosaurusrex
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 2048 Posts
    @themosaurusrex

    We’re very sorry, this task has been postponed yet again, the good news is that it is currently in the pipeline and WILL be included with v 1.3.8.

    Again sorry, and thank you for your patience.

    Andrea
    Participant
    • 26 Topics
    • 133 Posts
    @youfriend

    great job, work well! ^^

    Manathan
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 6297 Posts
    @themodactyl

    I’m glad tor read Olivier was able to help you @youfriend. 🙂

    Cheers,

Roboraptor 🦖
Themosaurus Topic Closer

Hi there,

This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!

Best regards,
The Themosaurus team.

Viewing 18 posts - 1 through 18 (of 18 total)

The topic ‘how to I change the default avatar guy?’ is closed to new replies.

Troubleshooting Demo Imports

You're trying to setup your theme but you're experiencing errors when importing the demo content? Or you've just followed the setup guide but your website doesn't look exactly like our demo? These are common issues for which you can find easy and quick fixes.

Happy With our Support So Far?

Feel free to review our theme on Themeforest! It helps us making our products more known to new potential customers, which allow us more time to improve the quality and develop new features. #SharingIsCaring ❤️

Discover MatchPress

Skip • Like • Super-Like

Add powerful matching features like Member likes, skips, super likes, conditional private messaging and much more.

Setup Your Cera or Gwangi powered Community Website and Turn it into an iOS and Android App

15% discount for Cera users

To unleash the full power of your Cera or Gwangi theme, we have partnered with the Zipline team. Your community website can now be fully setup and turned into your very own custom app for iOS and Android.

Whether you've newly acquired the theme or already got your site up and running, Zipline got you covered. And we got you an incredible discount.

Holiday, Weather & Festive effects
to pimp your WordPress Site