Archived topic
How to hide sidebar when using a layout element is not possible
1 reply · Started by Carsten on January 23, 2021
Hi there, I have been looking through the documentation to find a function to hide the sidebar on specific BuddyPress pages and components, in this case bp_is_activity_component() or bp_is_activity_component().
Please note that I can't use a Layout Element to Disable the Sidebar in this case. I would prefer to use a function solution rather than CSS
Thanks!
Hi there,
This should help: https://docs.generatepress.com/article/sidebar-layout/#using-a-function
There are a handful of examples in there where you'd just need to replace the conditions with the ones you mentioned.