[ad_1]
Hi– thanks for using Force Login!
I recommend you use the is_page() Conditional Tag to bypass visits to that page instead of using the absolute URL method.
Also, in case you’re unaware, the if ( is_single() ) { line in your bypass function is allowing all Posts to be publicly available. That was intended as an example in the FAQ and not required to use the bypass filter.
/**
* Bypass Force Login to allow for exceptions.
*
* @param bool $bypass Whether to disable Force Login. Default false.
* @param string $visited_url The visited URL.
* @return bool
*/
function my_forcelogin_bypass( $bypass, $visited_url ) {
if ( is_page('gps') ) {
$bypass = true;
}
return $bypass;
}
add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass', 10, 2 );
