Kevin,
Thank you for the quick response! So I made you suggestions, and it fixed the error. But then the code did let me get to that page I needed.
So I switched to the your other code – Method 1
SUCCESS!! Thanks again!!
`/**
* Bypass Force Login to allow for exceptions.
*
* @param bool $bypass Whether to disable Force Login. Default false.
* @return bool
*/
function new_forcelogin_bypass( $bypass ) {
// Get visited URL without query string
$url_path = preg_replace(‘/\?.*/’, ”, $_SERVER[‘REQUEST_URI’]);
// Allow URL
if ( ‘/my-account/lost-password/’ === $url_path ) {
$bypass = true;
}
return $bypass;
}
add_filter( ‘v_forcelogin_bypass’, ‘new_forcelogin_bypass’ );