Skip to:
Content
Pages
Categories
Search
Top
Bottom

Avatar only shows on main BP site not child site

  • Avatar of myladeybugg
    myladeybugg
    Participant

    @myladeybugg

    I am running the current versions of WP multisite and buddypress. I am an admin on the main site (domain.com) and I just created a new site (domain.com/user) and noticed my avatar does not carry over.

    On the main site and on the activity stream, etc. my uploaded avatar shows. When I go to my other site it just shows the default avatar.

    Is there a way to sync these two?

    I have `/*BP Multisite*/
    define( \’BP_ENABLE_MULTIBLOG\’, true );` enabled in my wp-config file.

Viewing 1 replies (of 1 total)
  • Avatar of Caroline Chen-Whatley
    whatleycc
    Participant

    @whatleycc

    I don’t know if this is the “correct” way to do it but what I did is created a new function file (say avatar_fix.php) and I placed it in the mu-plugins folder so it will be active for all sites.

    Then I put inside the avatar_fix.php file the following code with the appropriate <?php and ?> open and close tags (sorry can’t seem to put those into the code tags as it keeps on blanking my code out:
    `
    function avatar_setup() {
    //define(‘BP_AVATAR_UPLOAD_PATH’, ‘/martialarts/wp-content/uploads’);
    define(‘BP_AVATAR_URL’, get_bloginfo(‘url’) . ‘/wp-content/uploads’);
    }

    add_action(‘init’,’avatar_setup’);
    `

    The reason the issue was happening for me (and I suspect you as well) is that when it went off the main site, the url it was getting for the image was incorrect (was losing the “wp-content/uploads” portion). You may need to adjust the url part if that is not where you’re storing the avatar images.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.