[ad_1]
Hi, thanks for using Force Login!
Since you’re using custom login and forgot password URLs, you’ll need to use the bypass filter to tell Force Login to allow visits to those pages.
I recommend you try the following code with the is_page() conditional function:
/**
* Bypass Force Login to allow for exceptions.
*
* @param bool $bypass Whether to disable Force Login. Default false.
* @return bool
*/
function my_forcelogin_bypass( $bypass ) {
// Allow custom login & lost-password pages
if ( is_page( array( 18681, 'lost-password' ) ) ) {
$bypass = true;
}
return $bypass;
}
add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass' );Good luck!
