You can bypass Force Login based on any condition by adding the v_forcelogin_bypass
filter to your theme’s functions.php file. You may also use the WordPress Conditional Tags.
For example:
/**
* 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_single() ) {
$bypass = true;
}
return $bypass;
}
add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass' );
I suggest you try the following bypass method:
Method 3 – Page URL based on Query String Parameter(s) and/or Value(s)
For example:
// Allow iframe videos
if ( $_GET['action'] == 'getembedcode' && isset( $_GET['v'] ) ) {
$bypass = true;
}