Actually, I did answer your question –?those links show examples of code to whitelist or bypass the login for any circumstance.
You just need to adjust them to fit your specific needs.
I don’t want to individually whitelist every post I make.
And you don’t have to, look at the LinkedIn article I suggested –?it has an example of how you can whitelist a URL using the WordPress Conditional Tags.
You just need to replace the is_home()
function with is_single()
if you want to whitelist any post URL.
https://gist.github.com/kevinvess/641aad7cbe5bb42a751ef8ba7fee74ce#file-wp-force-login-bypass-php-L8
If you’re unfamiliar with the WordPress Conditional Tags and you’re unsure of how to write your own unique conditions to whitelist URLs for your website –?I suggest you hire a developer to help you craft the exact code you need.
Thanks for using Force Login!