Regfarding BuddyPress hide Widgets

Hi I have a question regarding "BuddyPress Hide Widgets"


Set specific BuddyPress widgets to be available for use only on your network's main site.

Now, my main site (#site 1) is where I have the company site on with prosites for selling blogs etc. So have have the buddypress network site on #site 2 configured as the main "blog/BuddyPress site". Will this still work the plugin or is it hardcoded to "site1 in the system?


  • Michael Bissett

    Hey @DreamQuest, Michael here! :slight_smile:

    It is designed to work with the main site out of the box (as noted in the description you quoted), we'd need to do a quick change to the code.

    In your case, you'd want to log into your site via FTP, and open this file:


    From there, change line 62 of that file from this:

    if (is_main_site())

    To this:

    if (get_current_blog_id() === 2)

    That should do the trick. :slight_smile:

    Hope this helps!

    Kind Regards,

  • PowerQuest

    Hi @michael55

    Thanks a lot!

    So I had some time now to actually sit and work with this, and the "BuddyPress" menu does not chow up at all once the plugin has been activated. I have attempted this with both the code change and without it.
    I dont know what is wrong. As explained before the main BuddyPress site is running on the the subsite 2 while the main site does not run BP press at all. BuddyPress is not network activated but actived by a "per site" basis instead as I do not wish to force BuddyPress on my customers and therefor I think it should be a free choice to have it or not.
    Network settings menu:


  • Michael Bissett

    Hey @dreamquest,

    Here's the thing: BuddyPress Hide Widgets is meant to be used with BuddyPress network activated, rather than site-by-site. We can still make this work, but there's one other tweak that needs to be made.

    BuddyPress Hide Widgets ties into the settings page that BuddyPress generates... which means that now BuddyPress is activated on a site-by-site basis, you need to refer to that subsite's settings, rather than the network settings.

    Problem: The widget settings show up for all subsites that have BuddyPress active, rather than just the subsite you're trying to target here.

    Solution: The file in the attached .zip file. It's got a tweak that'll display the widget settings only for the subsite with an ID of 2.

    Log in to your site via FTP, and replace this file:


    With the file inside the attached .zip file.

    Kind Regards,

  • PowerQuest

    Thank you so much Michael Bissett !!!! :slight_smile:

    Well it is network activated, (the plugin itself), but there is only one BuddpyPress website in the network, for now...

    The idea is that those of my customers opt in and activate BuddyPress on their site, if they wish to do so and will then automatically then go under the network settings.

    Just activating BuddyPress for every website by default kinda defeat the purpose I think. I wold not be happy if I bought hosting space and saw that BuddyPress is activated by default. :slight_smile:

    All the best

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.