Last active
August 29, 2015 14:10
-
-
Save BoweFrankema/45202c5387f406779d1e to your computer and use it in GitHub Desktop.
Hide BuddyPress widgets on Multisite install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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