Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

  • wescleveland
    Participant

    @wescleveland

    Completely agree that the solution would have to be without hacking BP or WP in order to more easily support.future versions of both. Physical sub-domains is an interesting idea. It is one that I have considered and perhaps may land there. Your comments just reinforce that as a viable direction. Thanks for the input. It is appreciated.


    wescleveland
    Participant

    @wescleveland

    Just ran across this article (https://codex.buddypress.org/extending-buddypress/bp-custom-php/) talking about bp-custom.php. Putting the above code in bp-custom.php is MUCH cleaner than modifying bp-core.php. So, bp-core.php is now back to it’s original state and my new bp-custom.php contains:

    `<?php
    /* Define on which blog ID BuddyPress should run */
    if ( !defined( ‘BP_ROOT_BLOG’ ) )
    define( ‘BP_ROOT_BLOG’, get_current_blog_id() );
    ?>`

    and all seems good. Haven’t found any yet, but don’t know if there might be any unintended side effects of using get_current_blog_id().

    Thanks BP developers for a GREAT plugin!!!


    wescleveland
    Participant

    @wescleveland

    I have been struggling with this same problem for about half a day now and finally found this topic. I do have a concern with hard-coding a blog id. I took the following approach (similar to graf1771’s but more generic):

    As already mentioned, line 21 ff. in /wp-content/plugins/buddypress/bp-core.php states:

    `/* Define on which blog ID BuddyPress should run */
    if ( !defined( ‘BP_ROOT_BLOG’ ) )
    define( ‘BP_ROOT_BLOG’, 1 );`

    instead of changing the “1” to my default blog id, I changed the “1” to “get_current_blog_id()” resulting in:

    `/* Define on which blog ID BuddyPress should run */
    if ( !defined( ‘BP_ROOT_BLOG’ ) )
    define( ‘BP_ROOT_BLOG’, get_current_blog_id() );`

    Problem solved!

    Since I am new to BP (been playing with it for about 2 days now), I am concerned that this approach may have negative side affects on other BP functionality. Anyone have any thoughts on this?

Viewing 3 replies - 1 through 3 (of 3 total)
Skip to toolbar