How to achieve certain page (url) accessible to certain users

I have created a download page I want it should be accessible to certain users who are logged in to my blog.
No one else should have direct access to page. Is there some plugin for that?

I have searched a lot but not found any meeting this requirement. Moreover if this possible to create a custom log in page other than wp-admin?

Read More

I have tried the password protect option in WordPress visibility but that is not much useful.

Related posts

Leave a Reply

1 comment

  1. You could create a simple page template with just five lines of code:

    /* Template Name: Protected Page */
    if ( ! is_user_logged_in() )
        auth_redirect();
    else
        require_once './page.php';
    

    Then select that template for the page you want to protect.

    auth_redirect() will send the user to the login page and back to the original URL after they are logged in.