Restrict Access to Home Page (4 posts)

  1. moonbug
    Posted 4 years ago #

    I'm using the default home page in Twenty Eleven theme. I want to keep this page but I also want to restrict access to it. Since this page is not listed, I cannot set the visibility to private.

    How do I set the home page restriction level to subscriber?

  2. chzumbrunnen
    Posted 4 years ago #

    what about using a specific page instead?
    I'd prefere to see an explanation why I' can't get access to certain pages.

  3. moonbug
    Posted 4 years ago #

    I just wanted to protect the visibility of the default index.php of the theme in case someone manually types it on the url.

    What php code can I add to set the visibility to private.

  4. chzumbrunnen
    Posted 4 years ago #

    There's no real content in the index.php. This page only loads the wordpress core which loads the theme etc.

    So you can't and don't need to set the visibility here. WordPress takes care of the security with internal mechanisms.

    Therefore you define a static homepage in settings/reading and then you can change the visibility for this and any other page that needs to be private or password protected.

    If this is not good enough, I'd recommand to go with a membership plugin, like

    Paid Membership Pro
    Restrict Content Pro
    Wishlist Member

    (list is from a Google document by Chris Coyer from CSS-Tricks)

Topic Closed

This topic has been closed to new replies.

About this Topic