/*Reverse sticky header*/
  1. Home
  2. Knowledge Base
  3. Customizations
  4. PHP Functions
  5. Hide/Remove the BuddyPanel on Specific Pages

Hide/Remove the BuddyPanel on Specific Pages

By default, the platform does not have this option. You can use the following function code to hide/remove the BuddyPanel on specific pages.

Please follow the steps below:

1. Go to Appearance > Theme Editor.

2. Under Select theme to edit, choose (BuddyBoss Child/whatever theme is active), then click Select.

3. Below Theme Files, select Theme Functions (functions.php).4. Append the code just before the closing PHP tag “?>”:

// Remove BuddyPanel on certain pages 
function bb_remove_buddypanel_menu() { 
// Please change the number inside the array to the 
// Page IDs you need to exclude 
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 );

Please note this example shows example pages 1,2,3,4 – please delete this and replace with your page id’s of the pages you you would like for the buddypanel to be removed on.

5. Click Update File to save the changes.

Note: Any modifications are considered as custom work already. Know more about our Support Policy here: https://www.buddyboss.com/support-policy/

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Support

To speak to our Agency consultant, fill in the form found at our Contact Page.

"*" indicates required fields

Get Started

Enter your name and email address to get started with your project...

Name*