Code for Whitelist Not Working
-
The code below is in my functions.php file but does not seem to be working. I just need people to be able to reset their password at the login screen. Any suggestions? My website is https://primemedicaltraining.com/instructors.
/** * Filter Force Login to allow exceptions for specific URLs. * * @return array An array of URLs. Must be absolute. **/ function my_forcelogin_whitelist($whitelist) { // allow any page URL within /my-account/ if( in_array('my-account', explode('/', $_SERVER['REQUEST_URI'])) ) { $whitelist[] = site_url($_SERVER['REQUEST_URI']); } return $whitelist; } add_filter('v_forcelogin_whitelist', 'my_forcelogin_whitelist', 10, 1)
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Code for Whitelist Not Working’ is closed to new replies.