Whitelist not working
-
Hello,
I used this code to whitelist my custom registration page. I used the page ID but it still redirects to the login page.
/**
* Bypass Force Login to allow for exceptions.
*
* @param bool $bypass Whether to disable Force Login. Default false.
* @return bool
*/
function my_forcelogin_bypass( $bypass ) {
if ( is_page( 2569 ) ) {
$bypass = true;
}
return $bypass;
}
add_filter( ‘v_forcelogin_bypass’, ‘my_forcelogin_bypass’ );I also tried using this to no avail
/**
* Filter Force Login to allow exceptions for specific URLs.
*
* @param array $whitelist An array of URLs. Must be absolute.
* @return array
*/
function my_forcelogin_whitelist( $whitelist ) {
$whitelist[] = home_url( ‘/register/’ );
return $whitelist;
}
add_filter( ‘v_forcelogin_whitelist’, ‘my_forcelogin_whitelist’ );The page I need help with: [log in to see the link]
- The topic ‘Whitelist not working’ is closed to new replies.