check if your theme offers different page templates for BuddyPress pages, allowing customization of layouts and sidebar settings. If available, utilize these templates accordingly. Alternatively, explore the use of custom CSS to hide the sidebar on specific pages where it’s not desired, while ensuring it remains visible on profile and group detail pages