Re: How to make a private community?
Hi Mike,
Your code is correct, but since your page isn’t the BP_REGISTER_SLUG or BP_ACTIVATION_SLUG, it will lead you to redirect hell!
Add your page (and any other page you need to whitelist from blocking) to the following conditional:
if ( bp_is_register_page() || bp_is_activation_page() || THEWELCOMEPAGE ) //buddypress
return;
Change THEWELCOMEPAGE to something that checks if you’re on welcome.php.
If welcome.php is a WordPress page with the slug of “welcome”, you would use something like:
is_page('welcome')
So your conditional would look like:
if ( bp_is_register_page() || bp_is_activation_page() || is_page('welcome') ) //buddypress
return;
Hope that helps!