how to redirect all non-authenticated users only for link more content and single page website?
for all page website
function protect_whole_site() {
if ( !is_user_logged_in() ) {
auth_redirect();
}
}
add_action ('template_redirect', 'protect_whole_site');
change on functions.php.That's not nice.
Help me please.
Any help would be appreciated! Thanks!