Introduction
BuddyBoss displays the BuddyPanel on all pages by default. You can hide or remove the BuddyPanel on specific pages by adding a small custom function to your active theme. This ensures that certain pages remain clean without the panel for a better user experience. This guide explains how to hide the BuddyPanel on specific pages.
Custom Workaround
Before proceeding, make sure you have a complete site backup.
- Navigate to Appearance > Theme Editor in your WordPress admin dashboard
- Under Select theme to edit, choose your active theme (preferably BuddyBoss Child Theme), then click Select
- From the Theme Files list, open Theme Functions (functions.php)
- Add the following code just before the closing PHP tag (?>):
// Remove BuddyPanel on certain pages
function bb_remove_buddypanel_menu() {
// Replace the numbers in the array with the Page IDs where you want to remove BuddyPanel
if( is_page( array( 1, 2, 3, 4 ) ) ) {
unregister_nav_menu('buddypanel-loggedin');
unregister_nav_menu('buddypanel-loggedout');
}
}
add_action( 'template_redirect', 'bb_remove_buddypanel_menu', 20 );- Click Update File to save the changes
Replace the example page IDs (1, 2, 3, 4) with the IDs of the pages where you want the BuddyPanel removed.
Troubleshooting and FAQs
Q: The BuddyPanel is still visible on selected pages.
A: Double-check the page IDs you entered and ensure they are correct. Clear your cache and refresh the page.
Q: Will this hide the BuddyPanel for all users?
A: Yes, this change hides the BuddyPanel for all visitors on the selected pages.