I have the code below to redirect my WordPress logged out users to page /login/
<?php
if (!is_user_logged_in()) {
if ( ! is_page( 'register-member' ) )
if ( ! is_page( 'groups' ) ){
wp_redirect( 'https://members.google.com/login/');
exit;
}
} ?>
And currently i whitelisted /register-member/ and /groups/ so logged out users can access them.
But I'm trying to whitelist more pages and it's not working and I think it's overwritten by the theme (BuddyPress)
Also i'm using "Restrict Content Pro" plugin
So i'm looking for a solution to whitelist other pages.