Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hiding or Protecting BP components from not log in users

  • Avatar of Joe2000
    Joe2000
    Participant

    @joe2000

    Hello BP Community,

    I have already tried over 10 plug ins and on my case it did not work. What I would like to do is to simply hide “activities” “groups” “members” components from non-log in users. The plug ins that I tried did not work out because I have a land-page and most of them wants to redirect to wp-log in or register or sign up area and by doing that my land-page did not appear. So if the BP community knows a simple code or other solutions that hide BP components , please share it. I highly appreciate your help.
    Regards,
    Joe

Viewing 15 replies - 1 through 15 (of 15 total)
  • Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @joe2000
    Is your landing page the one you set in dashboard/settings/reading?

    Avatar of Joe2000
    Joe2000
    Participant

    @joe2000

    Hi @bphelp

    Not really it was set via parallel theme. It is a static page that offers the various membership roles to be chosen by the user. (The order is Landpage -> sign up (based on membership choice) -> Home (where BP press is).
    Any ideas? I have tried your plug in too. But when I do not specify a redirection (Safari is unable to open the landpage (too much redirection it says as error))

    Thanks
    Joe

    Avatar of Joe2000
    Joe2000
    Participant

    @joe2000

    Actually double checking @bphelp, it is the same page set in dashboard/settings/reading.
    Ideas?

    Avatar of Joe2000
    Joe2000
    Participant

    @joe2000

    Any thoughts my friend @bphelp?

    On your plug in it says:

    “Define Your Redirect Slug For Logged Out Visitors.
    Example:
    This can be register, sign-up, or wp-login.php.”

    If that can be an external URL instead , I think it would solve the problem

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @joe2000
    In line 37 of my plugin after this:
    if ( !is_user_logged_in()
    add this:
    && !is_home()
    This will allow that landing page to logged out users but will redirect to register or wp-login.php depending on which you define in the plugins settings. All other pages other than the landing page will be private.

    Avatar of Joe2000
    Joe2000
    Participant

    @joe2000

    Hi @bphelp

    I think logged in users are working fine, it already redirects to home (after they log in)

    My problem seems to be with “the visitors” that can freely browse the site without being log in.

    And your plug in seems great but it causing conflict with some redirection I have in place.

    For example register already redirect to the landpage so if I add register on

    “Define Your Redirect Slug For Logged Out Visitors.
    Example:
    This can be register, sign-up, or wp-login.php.”

    It makes a double looping and the browsers kind of block or do not accept this.

    If the redirect slug could be a url it probably fix the problem.

    Is that something possible?

    Thanks for your time on this, if I find a solution , I will be glad to send some beers on your way (via PayPal) : )

    Cheers

    Joe

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @joe2000
    I like beer plus I am on vacation so extra beer funds are great. I will help as best I can. What kind of redirect do you have in place already? Can you provide me the code? If the plugin is not going to work out I could write you a custom function but I will need as much detail as you can provide me so I can avoid conflicts with what you already have in place.

    Avatar of Joe2000
    Joe2000
    Participant

    @joe2000

    I think @bphelp it will be better and faster to send you the wp-log in info, so you can go inside of the site and do your magic on it.

    Let me know your e-mail/contact and I will send you the log in info.

    Thanks a lot buddy.

    Beers on the way for sure. Please try your best to solve this problem.

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @joe2000
    Send that info to bphelp.1@gmail.com I will do my best to get you worked out!

    Avatar of Joe2000
    Joe2000
    Participant

    @joe2000

    Great @bphelp info on the way in five minutes.

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    @joe2000
    Unless @joe2000 has objections we can close this as I resolved it privately. Thanks again Joe!

    Avatar of Joe2000
    Joe2000
    Participant

    @joe2000

    Sure I can close it, @bphelp did a great job and highly recommend him for everyone.

    Avatar of Joe2000
    Joe2000
    Participant

    @joe2000

    resolved.

    Avatar of bp-help
    bp-help
    Participant

    @bphelp

    Thanks for the kind words @joe2000 !

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Closing this, as no benefit for others on a public help forum.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Hiding or Protecting BP components from not log in users’ is closed to new replies.