Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Filter site_url() to always point to main blog/site (Help request)


Brajesh Singh
Participant

@sbrajesh

hi Mike
If I understand your situation correctly, here is a quick and simple fix
/* site url uses get_option (siteurl), just filter on the option*/
add_filter(“option_siteurl”,”my_site_url”);
function my_site_url(){
return get_blog_option(1,’home’);/* return the url of the main site*/
}

btw, profile will only point to yoursite.com/subsite/members/usersname if the BP_ENABLE_MULTIBLOG is defined somewhere, otherwise user profile will alwys point to the main site.
The trick above, makes the heder urls(like members/groups/sitename) etc to link back to the main site not the sub blog. Hope that helps.

Skip to toolbar