Title: Reverse &#8220;Force Login&#8221;
Last modified: February 22, 2022

---

# Reverse “Force Login”

 *  Resolved [heywatchoutdude](https://wordpress.org/support/users/heywatchoutdude/)
 * (@heywatchoutdude)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/reverse-force-login/)
 * Hi,
 * is it possible to reverse the “Force Login” Plugin, which means I only want to
   enforce a login for pages/sites I have specified in the functions.php file. (
   not for all)
 * Thanks!

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

 *  Plugin Author [Kevin Vess](https://wordpress.org/support/users/kevinvess/)
 * (@kevinvess)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/reverse-force-login/#post-15397877)
 * Hi–
 * You may activate the plugin per site if you’re using a multisite install. It 
   does not need to be “network enabled” for all sites in WordPress multisite.
 * Otherwise, you could use the `v_forcelogin_bypass` filter to always be `true`
   then set a conditional statement to be `false` for specific pages that you want
   to enforce the login. For example:
 *     ```
       /**
        * Bypass Force Login.
        *
        * @param bool $bypass Whether to disable Force Login. Default false.
        * @return bool
        */
       function my_forcelogin_bypass( $bypass ) {
         // Allow all to be publicly accessible
         $bypass = true;
   
         // Force login for specific pages
         if ( is_page( 7 ) ) {
           $bypass = false;
         }
   
         return $bypass;
       }
       add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass' );
       ```
   
 * However, if you only need to require login for a few specific pages, I recommend
   coding a custom redirect solution for only those pages. Force Login is primarily
   a full site solution.
 * Good luck!
 *  Thread Starter [heywatchoutdude](https://wordpress.org/support/users/heywatchoutdude/)
 * (@heywatchoutdude)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/reverse-force-login/#post-15400051)
 * Hi Kevin,
 * thanks that works like a charm 😀

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

The topic ‘Reverse “Force Login”’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [heywatchoutdude](https://wordpress.org/support/users/heywatchoutdude/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/reverse-force-login/#post-15400051)
 * Status: resolved