Quantcast
Viewing all articles
Browse latest Browse all 8245

aliarsh on "how to Permissions access user not login?"

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!


Viewing all articles
Browse latest Browse all 8245

Trending Articles