Skip to:
Content
Pages
Categories
Search
Top
Bottom

how disable buddypress header menus from main site in wordpress network mode?


  • doctorproctor
    Participant

    @doctorproctor

    I’ve installed BuddyPress on a WP network so I can retain theme/functionality control over the main site, then utilize BP social networking theme/functionality on a /community blog. I followed instructions at http://codex.buddypress.org/getting-started/install-buddypress-on-a-secondary-blog/ after following http://codex.wordpress.org/Create_A_Network, and all seems to work fine. But BuddyPress was presented in my Plugins window as a network-activate-only plugin, and indeed once activated I see the BuddyPress header menus (e.g., prior to login the community site name at top left, with Log In and Blog Authors to the right; when logged in you see My Account, My Blogs, Notifications, and Blog Authors to the right) not only on the /community blog but on the main site as well.

    How can I remove this BuddyPress header wrapper from the main site, where it is not needed nor desired?

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

  • @mercime
    Participant

    @mercime

    You mean the BP adminbar :-) Here’s how to have adminbar only in site where BP is installed.
    http://buddydev.com/buddypress/remove-buddypress-admin-bar-from-all-blog-except-the-main-buddypress-site/
    P.S. don’t forget to add the opening `<?php` at the top of the code


    doctorproctor
    Participant

    @doctorproctor

    Thank you! Now I have the name right ;-). I guess it was confusing to me that BuddyPress acts as a *network* activate/deactivate plugin, with settings that span all blogs on the network, in spite of that whole secondary blog installation I did following the instructions at https://codex.buddypress.org/getting-started/install-buddypress-on-a-secondary-blog/.

    Did I somehow not perform that secondary blog installation correctly, or is this just how BuddyPress works?


    doctorproctor
    Participant

    @doctorproctor

    Okay, now I do think my secondary blog installation is not working, as when I implemented the above via bp-custom.php, the admin bar was removed from *both* my main blog (where I don’t want it) and secondary blog (where I do want it).

    I’m looking at the instructions for BP secondary blog installation, and the grammar of step 1 is a bit perplexing:

    “In order to run Buddypress on a secondary blog, you should create a second blog and modify BuddyPress’ internal settings to set your new blog as the BP root blog. Next [what do they mean by “Next” here? I see what follows as the same instruction], define the ‘root’ blog you would like BuddyPress to reside at by adding the code snippet below to wp-config.php [this part is simple].”

    The code I added to wp-config.php following instructions for WP network (multisite) and BP secondary blog is:

    `define(‘WP_DEBUG’, false);
    define(‘WP_ALLOW_MULTISITE’, true);
    define( ‘MULTISITE’, true );
    define( ‘SUBDOMAIN_INSTALL’, false );
    $base = ‘[mysite]/’;
    define( ‘DOMAIN_CURRENT_SITE’, ‘[myhost]’ );
    define( ‘PATH_CURRENT_SITE’, ‘[mypath]’ );
    define( ‘SITE_ID_CURRENT_SITE’, 1 );
    define( ‘BLOG_ID_CURRENT_SITE’, 1 );

    define ( ‘BP_ROOT_BLOG’, 2 );`

    Where info in [] above has been replaced by literals in my case. The secondary blog is definitely #2; is there something else I’ve missed that (a) results in BP acting like a network plugin (vs. one restricted to the secondary blog) and (b) removes *all* admin bars from both blogs?

    Thanks, all.


    doctorproctor
    Participant

    @doctorproctor

    To diagnose the problem, I edited the code recommended in http://buddydev.com/buddypress/remove-buddypress-admin-bar-from-all-blog-except-the-main-buddypress-site/ by using a literal, i.e. replacing

    `if($current_site->blog_id!=BP_ROOT_BLOG)`

    with

    `if($current_site->blog_id==n)`

    With n = 1 (the main site, where I don’t want BuddyPress admin bar), the admin bar is disabled from *both* this site and the BuddyPress site (blog 2); with n = 2 (the BuddyPress blog), the admin bar is enabled for both!

    This has confirmed that, in my installation, $current_site->blog_id is stuck at 1 no matter whether I’m on the main site or the BuddyPress subdirectory.

    Again, I suspect my BuddyPress secondary blog installation is not working correctly, which may explain the above, but ideas quite welcome!

    What version of WordPress and BuddyPress are you using, please?


    doctorproctor
    Participant

    @doctorproctor

    Latest, I believe (WP 3.0.4, BP 1.2.7), installed from fresh download yesterday.


    doctorproctor
    Participant

    @doctorproctor

    Can anyone please confirm the following from my previous requests: (a) that BuddyPress secondary blog installations on a WP multisite are not restricted to the secondary blog (i.e., a network-activate-only plugin), and more to the point, (b) how I can deactivate the admin bar from *only* the main site (note that by following the recommendations above, it’s removed from both sites, but this is due to blog_id being stuck at 1 no matter which blog I’m on). At this point I’ve gotten nowhere, and am seriously wondering whether BuddyPress is a good idea on a multisite.

    As a final request, my BP account for this forum is set to receive email notifications, but I have yet to receive one email of a posting to this thread; this behavior does not happen with similar forums to which I’m subscribed.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘how disable buddypress header menus from main site in wordpress network mode?’ is closed to new replies.
Skip to toolbar