thanks dsader
<?php
function registered_subscribers_only() {
// Checks if a user is logged in, if not redirects them to the login page
if (!current_user_can('level_0'))
{ nocache_headers();
header("HTTP/1.1 302 Moved Temporarily");
header('Location: ' . get_settings('siteurl') . '/wp-login.php');
header("Status: 302 Moved Temporarily");
exit();
}
}
add_action('template_redirect', 'registered_subscribers_only');
?>
I use code as mu-plugin, or add on options-privacy.php, but anyone can register as new user also can visit the protected blog. Can somebody give me suggestion to customise options-privacy in control panel can work same function as wordpress.com? visible only to register users I choose.
thanks
I try also Setup wp-private-blog.