Unfortunately, you may not be able to use my plugin with your theme –?so you may just have to figure out a new way to achieve your objective. Different theme or plugin?
The only suggestion I have to get my plugin to work with your theme is to try looking at the code to figure out what needs to be whitelisted to allow your theme to pull in these posts from the client-side without hitting the Force Login redirect.
Maybe you could try whitelisting the entire wp-admin
directory?
/**
* Filter Force Login to allow exceptions for specific URLs.
*
* @return array An array of URLs. Must be absolute.
**/
function my_forcelogin_whitelist( $whitelist ) {
$whitelist[] = site_url('/');
// whitelist any URL within the specified directory
if( in_array('wp-admin', explode('/', $_SERVER['REQUEST_URI'])) ) {
$whitelist[] = site_url($_SERVER['REQUEST_URI']);
}
return $whitelist;
}
add_filter('v_forcelogin_whitelist', 'my_forcelogin_whitelist', 10, 1)