Registered Users Only Plugin

This plugin disables non-registered access to any content, only registration & login is allowed. The script is very simple:

function registered_users_only() {
    $login_url = "/wp-login.php";
    if ( !is_user_logged_in() && substr( $_SERVER['PHP_SELF'], 0, strlen( $login_url ) ) != $login_url ) {

add_action('init', 'registered_users_only');

You can download the plugin here:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.