I made some changes to functions.php, in order to redirect all pages to wp-login.php using an answer I found here: How can I make my wp-login.php the homepage?
I am struggling to figure out how to allow access to select non-password protected pages on my site while maintaining the need for everything else to be password protected. Prior to using the code in the linked suggestion, I had a couple of publicly accessible samples pages. Those are now getting redirected to the login prompt as well.
I tried this but I'm not having any luck:
add_filter(
'ppwp_sitewide_has_bypass',
function ( $allowed ) {
if ( $allowed ) {
return $allowed;
}
// Add specific page to bypass
$whitelist_pages = [ 'samples' ];
Thanks