Hi @renaisens and @vinayakboga8 ,
Maybe this can help you:
add_filter( 'restricted_site_access_is_restricted', 'exclude_page_from_restriced_access', 10, 2 );
function exclude_page_from_restriced_access( $is_restricted, $wp ) {
$url = 'https://' . $_SERVER[ 'HTTP_HOST' ] . $_SERVER[ 'REQUEST_URI' ];
$current_post_id = url_to_postid( $url );
if ( $current_post_id == '644' ) {
$is_restricted = false;
}
return $is_restricted;
}
In my case I had to exclude a page with ID 644. You have to put this code in functions.php. It maybe is a quick and dirty solution, but it works for me.
Regards Will