Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: BuddyPress on Separate Blogs


Brajesh Singh
Participant

@sbrajesh

@lightcapturer @mercime
It is possible.
Try following code in bp-custom.php

add_filter("bp_core_get_user_domain","only_for_root_domain");

function only_for_root_domain($url){
$url_parts=explode("/", $url);
//find the username part
$username=$url_parts[count($url_parts)-2];//the last tocken

$root_domain=get_blog_option( BP_ROOT_BLOG, 'home' );
/* If we are using a members slug, include it. */
if ( !defined( 'BP_ENABLE_ROOT_PROFILES' ) )
$domain = $root_domain. '/' . BP_MEMBERS_SLUG . '/' . $username . '/';
else
$domain = $root_domain . '/' . $username . '/';
return $domain;

}

here is a pastebin link in case the above code does not et posted
http://bpdev.pastebin.com/cqiHNnsx

Skip to toolbar