The MU forums have moved to

visible only to register users I choose (1 post)

  1. conpeo
    Posted 17 years ago #

    thanks dsader
    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");
    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 visible only to register users I choose.


    I try also Setup wp-private-blog.

About this Topic

  • Started 17 years ago by conpeo