Support » Plugins » Hacks » Private Site Members Plugin

Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator bcworkz


    You must have a plugin conflict or Members conflicts with your theme. I have Members installed on my site (child theme of twentyeleven), so I tried the Private Site option. It worked as expected, and new users were able to register and get logged in with no trouble at all.

    i am using Peters Login/redirect plugin and thought initially that it was the fault but after various attempts it doesnt seem to be. I use a bare bone boiler plate template so that shouldnt cause a problem.
    The site link is

    Any Help would be appreciated.

    hi i figured out the problem. i had gravity forms user registration set as the register page. So for some reason it was not going to the page.

    Moderator bcworkz


    I know little of Gravity Forms, but this is what I think is happening.

    Members in Private Site mode essentially calls auth_redirect() on every page load to force a login if the user is not already logged in. The one exception is the wp-login.php page, because it sets up a circular situation where loading the page causes a redirect to the login page, in which by loading causes a redirect to the login page, in which by loading… You get the idea. Thus a built in exception for wp-login.php

    By using a gravity forms page, Members does not recognize it as a login page so it redirects to the login page, which in turn causes a redirect to the… here we go again! But there is no built in exception for gravity forms, causing a problem of runaway redirects.

    The solution would be to get Members to recognize your Gravity Forms registration page and not redirect when it loads. This is done in members/components/private-blog/default.php. The problem is your custom code here could be overwritten when the plugin updates. There is no filter hook you can use to do this cleanly. It would have to be a dirty hack.

    yeah, i think that was the issue, it just kept re looping. well at least we learn new things everyday, and thats the beauty of gaining knowledge.
    Only Issue i have with the members plugin is that i have custom fields on the pages. so even with the plugin activated to hide from users. You can still see the contents of the custom fields.
    If you look at the link you will see what i mean.

    Thanks again for your help.

    Moderator bcworkz


    Strangely, I don’t see any custom fields. But I am also not getting redirected to a login page, so things are clearly not working right. I suspect both plugins are hooked into ‘template_redirect’ action in a way that conflicts with the other. I’m not sure how the conflict occurs in this case, no idea for a possible fix or workaround.

    It seems safe to say the two plugins are incompatible with the other.

    i Removed the redirect login for the moment.
    If you look at the main page you can see it says:

    Sorry, but you do not have permission to view this content.
    Please Login Here to access all Features.

    and below is a text that says:
    Corporate Marketing Materials (which when clicked expands to some pdfs)

    Now i want to hide this Corporate Marketing Materials contents. As you can see it still shows. And thats the issue i have. Do you know a way to hide this content ? Thanks

    Moderator bcworkz


    I guess you’ve put the redirect back in, because I don’t see that page any more. That’s OK, I don’t know where the fields are coming from anyway. You can literally hide the fields with CSS, but the data is still sent to the user’s browser, so I doubt that will satisfy you.

    To prevent the fields from being sent to not logged in visitors, locate the code that is outputting the content and enclose it in a conditional that checks is_user_logged_in(). Like so:

    if ( is_user_logged_in() ) {
       // existing code that outputs custom fields

    hi yes i changed it. i just blocked the whole site as of now if the user is not logged in they dont see any content.
    Many Thanks for your help.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Private Site Members Plugin’ is closed to new replies.