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!