Running BuddyPress in a subdirectory
-
This is more a how-to than a request for help, at this point. Just in case others are interested in how to do this.
BuddyPress really seems to be designed to run in the root of a WPMU install, but for my purposes, that’s not what I wanted to do. I already had a functioning and active WPMU install at http://macaulay.cuny.edu/eportfolios . I wanted to have BP functioning for that WPMU install, but in a directory below that, reserving that root main blog for my “gateway.” I wanted to have http://macaulay.cuny.edu/eportfolios/social for the BP install.
It installed fine, and most things worked right from the beginning, but there were some difficulties.
First–the links across the top of the main page (the logo, the tabs for home, blog, members, groups, and blogs) did not work properly on the member pages (they worked on the home page). They directed to macaulay.cuny.edu/eportfolios/whatever, instead of macaulay.cuny.edu/eportfolios/social/whatever.
So to fix that, I went into wp-content/member-themes/buddypress-member/header.php
Line 37, 40, 41, 42, 44, and 49, I changed the URL to be a hardcoded reference to the appropriate pages.
Then I found that the search bar (in the top bar) did not work–it was also trying to search /eportfolios instead of /eportfolios/social.
For that one I had to go to wp-content/mu-plugins/bp-core.php and add /social to the urls in lines 1266, 1269, 1272.
That fixed the search bar nicely on the member pages, but not on the home page–and I couldn’t figure that out, so I just commented out the lines calling for that search bar in wp-content/themes/buddypress-home/header.php . If it didn’t work right, I didn’t want it!
I also wanted the hotlinks in people’s profiles to work–and they didn’t–so for that I had to change wp-content/mu-plugins/bp-xprofile/bp-xprofile-filers.php (line 51) to use the actual url /eportfolios/social/members/?s= instead of the site_url and MEMBERS_SLUG .
I guess ultimately there should be a plugin or a setting in the admin to help with all this? Then upgrades wouldn’t require re-doing all these little changes. But overall, I think it works, and it really is possible to have BP RC1 installed in a sub (or sub-sub) directory.
- The topic ‘Running BuddyPress in a subdirectory’ is closed to new replies.