Re: How do I unregister a sidebar?
Solved!!!
unregister_sidebar() keys off the sidebar id. I assumed this to be the same argument as name. It is not. However, the BuddyPress parent theme does not set sidebar id’s. So how to unregister? Codex reveals that when no id is explicitly set, the id’s default to sidebar-1, sidebar-2, sidebar-3… etc. So the code to unregister the “third-section” sidebar (for instance) is as follows (in functions.php of your child theme).
<?php
function remove_sidebar() {
unregister_sidebar('sidebar-3');
}
add_action( 'admin_init', 'remove_sidebar');
?>