Title: Code for Whitelist Not Working
Last modified: August 31, 2016

---

# Code for Whitelist Not Working

 *  Resolved [Andrew Randazzo](https://wordpress.org/support/users/theologian88/)
 * (@theologian88)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/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 [http://primemedicaltraining.com/instructors](http://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)
       ```
   
 * [https://wordpress.org/plugins/wp-force-login/](https://wordpress.org/plugins/wp-force-login/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/code-for-whitelist-not-working/#post-7098156)
 * The code you pasted should work.
 * However, it looks like you’ve setup a WordPress install inside another WordPress
   install. You might want to separate the [http://primemedicaltraining.com/instructors](http://primemedicaltraining.com/instructors)
   site from being inside the [https://primemedicaltraining.com/](https://primemedicaltraining.com/)
   site.
 * Maybe try creating a sub-domain for [http://instructors.primemedicaltraining.com/](http://instructors.primemedicaltraining.com/)
   and host it someplace else instead.
 * Also, you could try enabling the `WP_DEBUG` mode in your _instructors_ site’s
   wp-config.php file to see if there are any errors that need to be fixed.
    [https://codex.wordpress.org/WP_DEBUG](https://codex.wordpress.org/WP_DEBUG)
 *  Thread Starter [Andrew Randazzo](https://wordpress.org/support/users/theologian88/)
 * (@theologian88)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/code-for-whitelist-not-working/#post-7098418)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Code for Whitelist Not Working’ is closed to new replies.

 * ![](https://ps.w.org/wp-force-login/assets/icon.svg?rev=1904031)
 * [Force Login](https://wordpress.org/plugins/wp-force-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-force-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-force-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-force-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-force-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-force-login/reviews/)

## Tags

 * [Query String](https://wordpress.org/support/topic-tag/query-string/)

 * 2 replies
 * 2 participants
 * Last reply from: [Andrew Randazzo](https://wordpress.org/support/users/theologian88/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/code-for-whitelist-not-working/#post-7098418)
 * Status: resolved