Thanks for using Force Login! I’m glad you like it.
To decided which method of whitelisting your dynamic URLs, I’d need to know more specifics.
For example, if you want to whitelist the x.com/unirse/ URL regardless of the query string ?anything=whatever or none – I would suggest Method 1.
If you want to whitelist only that exact URL, including the query string, then I would recommend this:
/**
* Filter Force Login to allow exceptions for specific URLs.
*
* @return array An array of URLs. Must be absolute.
*/
function my_forcelogin_whitelist( $whitelist ) {
// list of single page URLs
$whitelist[] = site_url( '/unirse/?level=1' );
return $whitelist;
}
add_filter('v_forcelogin_whitelist', 'my_forcelogin_whitelist', 10, 1);
Lastly, if you’re asking to whitelist any page URL that has the query string parameter of ?level applied to it, or that specifically equals 1 – ?level=1 – I would recommend Method 3.
Just change the example URLs to match your pages, parameters, and/or values to whitelist any URLs or combination of URLs you need.
Hey there Kevin, you’re amazing!
Thanks for the example, I understood it and it worked perfectly. Also, thank you for the quick answer!
Keep working on this
Best,
Great! I’m glad you were able to get this resolved.
Be sure to rate and review my plugin to let others know how you like it.
Thanks for using Force Login!