BuddyPress Profile Visibility for Visitors

I see by default once membership installed, BuddyPress profile pages become restricted. I'm probably missing something really simple, but how do I undo this please? I've already tried making a positive rule to make BuddyPress pages visible with no success.

  • Tyler Postle
    • CGO

    Hey Jasper,

    Can you make sure that site tracking is enabled via Settings > BuddyPress > Components > Check Site Tracking and save settings.

    Then bring your BuddyPress Pages rule over to positive and select "Members".

    This should make the profile pages unprotected :slight_smile:

    Let me know if this does the trick! If not, we'll continue troubleshooting this with you.

    Cheers,
    Tyler

  • Tyler Postle
    • CGO

    Hey Jasper,

    If you want most of your pages accessible including the buddypress profile pages then it is best to use the negative rules instead of positive. Place in there what you DON'T want your visitors to see, then they should be able to see everything else, including your bp profile pages.

    Hope this helps :slight_smile:

    All the best,
    Tyler

  • Tyler Postle
    • CGO

    In this case you may need to go back to using the url group then just add in your posts/pages or whatever else you want your visitors to see :slight_smile: You might need to add in a few more rules than you normally would, but it will still give you the desired affect.

    Would this work for you Jasper?

    Look forward to your reply!

    All the best,
    Tyler

  • Jasper
    • Design Lord, Child of Thor

    thanks, I can try that but I just noticed with the free version of the plug I dont have this problem. do you know how i would call the plugin in PHP, the paid version is:

    $factory = Membership_Plugin::factory();

  • Jasper
    • Design Lord, Child of Thor

    Basically using the free version of the plugin may have solved the problem, but I would need the code Ash wrote in another post to work with the free version.

    /////////////////////////////////////// hide contact-details from level 1 members ///////////////////////////////////////

    /*

    * $restricted_level is the level ID that needs to be restricted to see BP profile fields

    * .bp-widget.contact-details here .contact-details should be the class name of the profile group

    */

    add_action( 'wp_head', 'hide_bp_field' );

    function hide_bp_field() {

    if( is_user_logged_in() ){

    $restricted_level = 1;

    $current_user = wp_get_current_user();

    $factory = Membership_Plugin::factory();

    $user_object = $factory->get_member( $current_user->ID );

    $userlevels = $user_object->get_level_ids();

    foreach( $userlevels as $userlevel ){

    if( $userlevel->level_id == $restricted_level ){

    ?>

    <style>

    .bp-widget.contact-details{

    display: none;

    }

    </style>

    <?php

    }

    }

    }

    }

  • Tyler Postle
    • CGO

    Hey Jasper,

    Was just about to go to bed before I saw your replies here.

    With the free version you aren't having any issues seeing profile pages?

    @Tyler, tried what you said and all pages still restricted, any thoughts on my other idea?

    Do you mind setting that back up again so I can take a look? I logged into your dashboard; however, it looks like you have a different members plugin now.

    Did Ash' code not work on the free version for you?

    Hi Tyler, I deleted and reinstalled the plugin, now cant add any access levels

    Make sure you go to Membership > Options > Advanced and from there verify and repair your database tables if they are broken :slight_smile:

    Look forward to your reply Jasper.

    Have a good night/day depending where you are in the world :p

    Cheers,
    Tyler

  • Jasper
    • Design Lord, Child of Thor

    Tyler, Still no joy I'm afraid. Tried doing a clean WP buddyprees install to see if that would work, created new fields and groups but your User Synchronization didn't bring over the profile fields, so will create a new thread for that, and for ash to rewrite the code for the free version of the plugin.

  • Jasper
    • Design Lord, Child of Thor

    Hi Tyler, Ash wrote new code so we have the free plugin working now on our live site, so not quite so much of a rush, but still no joy with the paid version. I may do another clean install to test this today, but I think by default it should show BP profile pages to visitors. So I'm guessing there is something clogging up the system on our site that is preventing this from happening. Any ideas?

  • Tyler Postle
    • CGO

    Hey Jasper!

    Thanks for the updates here and apologies for not getting back to you sooner on this one.

    I'm thinking this has to do with one of the recent updates. Here's a note from one of them:

    Since version 3.5.1.5, content is now protected by default unless access is specifically granted. Please be sure to adjust, if necessary, the positive rules in your access levels accordingly.

    So, this will of course include all virtual pages such as the BuddyPress profiles. Using URL groups should allow access.

    I've seen in the past where fresh installs have fixed this, or just creating new users. Not really an ideal solution though.

    We are in the middle of major update for Membership that should resolve all of these issues. A lot of the protection functionality is being re-written.

    When you added users on your clean install did it function properly?

    Look forward to your reply here!

    Cheers,
    Tyler

  • Jasper
    • Design Lord, Child of Thor

    Yes, the new install is working great, I have moved all the members over to the new site, problem is I have most of the profile fields moved over, but no avatars and they have not been put into their groups. I need to find a way to export members group ID's, and a url path to their avatar.

    How long till your major update? I fear I don't always have the cash to renew my subscription with you, I was a full member for 2 months, and only did the membership plugin this time.

  • Jasper
    • Design Lord, Child of Thor

    @Tyler Postle Good news! I have resolved (famous last words) this...

    The free plugin was installed and configured so BP profile pages showed. I then deleted the folder from the plugins directory, and replaced them with the paid plugin files. I'll tentatively say that it's looking OK now.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.