Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Hide BP widgets (6 posts)

Started 2 years ago by: Shnooka30

  • Profile picture of Shnooka30 Shnooka30 said 2 years ago:

    Anyone have a clue how to hide or remove BP widgets from sub-blogs.

  • Profile picture of Richard Venable Richard Venable said 2 years ago:

    This is how I did it on my site: (it just prevents BP from registering the widgets)

    // Remove buddypress widgets from blogs other than the main blog
    function hide_bp_widgets() {
    if (!is_main_blog()) remove_all_actions(‘bp_register_widgets’);
    }
    add_action(‘plugins_loaded’, ‘hide_bp_widgets’, 1); // Has to run before bp_setup_widgets()

  • Profile picture of Shnooka30 Shnooka30 said 2 years ago:

    @Richard Venable

    Thanks, did you drop that in the CSS file?

  • Profile picture of modemlooper modemlooper said 2 years ago:

    Functions go in a file bp-custom.php put this file in your plugins directory

  • Profile picture of Shnooka30 Shnooka30 said 2 years ago:

    Im confused, so I need to create a plug-in. I tried adding the following code to a file named “bp-custom.php” and then dropped into my plug-ins folder and got a error.on all my pages

    Then I tried to drop that same file into buddypress and it didnt work.

  • Profile picture of Richard Venable Richard Venable said 2 years ago:

    The file goes in your plugins directory. What error message did you receive?