Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Custom avatars arent showed on single blogs in WPMU


roberte
Participant

@roberte

in case anyone’s interested, here’s the exact code that worked for me on wp multi site 3.0.1 and bp 1.2.6, sub blogs on sub domains (thanks to @foralien).

add this to a bp-custom.php file and place the file in /wp-content/plugins/ (if you already have a bp-custom file, then add the code to the same one between the php start/end)

worked like a charm. been searching for answer to this for several days! finally.

`
function nfm_bp_avtar_upload_path_correct($path){
if ( bp_core_is_multisite() ){
$path = ABSPATH . get_blog_option( BP_ROOT_BLOG,

‘upload_path’ );
}
return $path;
}
add_filter(‘bp_core_avatar_upload_path’,

‘nfm_bp_avtar_upload_path_correct’, 1);

function nfm_bp_avatar_upload_url_correct($url){
if ( bp_core_is_multisite() ){
$url = get_blog_option( BP_ROOT_BLOG, ‘siteurl’ ) .

“/wp-content/uploads/”;
}
return $url;
}
add_filter(‘bp_core_avatar_url’, ‘nfm_bp_avatar_upload_url_correct’,

1);
`

Skip to toolbar