Site Login - Membership 2

Hi All !

Looking for some help.
I have a site and I want to block all access unless the preregistered users login.
So I want the landing page to be a login screen - after login user can have access to the site.

I am using the Membership 2 plugin.

How can I achieve this ?

Thanks.

  • Predrag Dubajic
    • Support

    Hey @ste,

    Hope you're doing well today :slight_smile:

    There are few steps that need to be taken in order to do this.

    First thing, go to Membership 2 > Add-ons and enable Protect Special Pages add-on.

    Now go to Membership 2 > Protection Rules > Special Pages tab and protect your home page to show only for registered members.

    After that when someone visits your site will be redirected to Protected page so there is still one more thing we need to do.

    Go to Membership 2 > Settings and click on edit next to Protected Content page selector.
    In that page add this shortcode:
    [ms-membership-login redirect_login="HOMEPAGE_URL"]
    Just change HOMEPAGE_URL with url of your home page.

    Done, it should now work as you wanted :slight_smile:

    Let us know if you have any additional questions.

    Best regards,
    Predrag

  • sdlx
    • Site Builder, Child of Zeus

    Thank You Predarag.

    This works !
    But I have a small cosmetic problem.

    This screen presents the user with a statement telling them to login followed by a link in the message, but under that has a username & password field.
    Logging in via the fields on that page does not work, but following the link opens the standard wp-login.php page which allows the users to login.

    I edited the shortcode again - removing your suggested text, and just adding the "members" shortcode from the shortcode template list and this removed the rogue login box.

    Thanks again for your help - points on their way to you my friend !

    Best Regards

  • sdlx
    • Site Builder, Child of Zeus

    Hi Predrag

    The site has gone live now thanks to your assistance, so I would prefer not to have external access enabled to this now (I hope you understand). But I have attached a screenshot that I missed from my last reply that shows the additional login fields.

  • Predrag Dubajic
    • Support

    Hi @ste,

    Unfortunately I can't get much info without support access, since I'm unable to replicate it on my end.

    If have a staging site where I could test this that would be great, or if you grant support access I would only change the shortcode for few minutes to do some testing and then revert it back to current state.

    Let us know if something from above is possible :slight_smile:

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.