Re: How do I detect whether I’m on a BuddyPress page?
To detect if you’re on a WP page use:
if ( bp_is_blog_page() )
Vice versa, to detect if you’re on a BuddyPress page, use:
if ( !bp_is_blog_page() )
There are some things like the activity front page that you’ll need to add to your conditional, but that’s to get you started.
All conditionals can be found in /buddypress/bp-core/bp-core-templatetags.php and on this codex page (might need updating):
https://codex.buddypress.org/developer-docs/conditional-template-tags/