Skip to content

Instantly share code, notes, and snippets.

@BoweFrankema
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BoweFrankema/45202c5387f406779d1e to your computer and use it in GitHub Desktop.
Save BoweFrankema/45202c5387f406779d1e to your computer and use it in GitHub Desktop.
Hide BuddyPress widgets on Multisite install
<?php
//Remove the BP widgets everywhere except the main BuddyPress site.
add_action( 'bp_include', 'firmasite_bp_include_remove_widgets', 5 ); // priority is crucial
function firmasite_bp_include_remove_widgets() {
if ( !bp_is_root_blog() && !bp_is_multiblog_mode() )
remove_all_actions( 'bp_register_widgets' );
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment