Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Make access members/groups sections members-only


Windhamdavid
Participant

@windhamdavid

this is an easy fix to keep non members out.

in you’re header for your member theme..

<?php if(!is_user_logged_in()){

nocache_headers();

header(“HTTP/1.1 302 Moved Temporarily”);

header(‘Location: ‘ . get_settings(‘siteurl’) . ‘/wp-signup.php?redirect_to=’ . urlencode($_SERVER[‘REQUEST_URI’]));

header(“Status: 302 Moved Temporarily”);

exit();

} ?>

make sure to put it above the <!DOCTYPE….

Skip to toolbar