Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hiding Activity Feed/Members from non-members.

  • Avatar of bkypes
    bkypes
    Participant

    @bkypes

    I know this topic has been covered in the past but the only solutions I’ve found have covered when BBpress and Buddypress we’re two different plugins. We all value our privacy and I’m seeing some red-flags go up from installing Buddypress already. My site is an ecommerce site and we’ve had some Facebook groups going for years now and I’d like to get them moved over to WordPress to have everything in the same place. Since it’s an ecommerce site, I have a lot of customers who already have profiles, and some made their username their email address. For obvious reasons, I don’t want to have those visible to any sort of web-crawlers since it will show activity once they log into their account to make a purchase on our site. I’d like to implement some sort of code to keep the members page search only, rather than having all the customers usernames or emails out in the open, and hide the rest of BuddyPress from non-logged in users. I just want to make sure everyones info is being protected and I’ve search for solutions everywhere and had no luck so far.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of bkypes
    bkypes
    Participant

    @bkypes

    So I’ve figured out the exact piece of of BP that I’m looking to hide, it’s the members directory form. I’ve tried a few different things out but I’ve had no success thus far.

    I’ve tried adding the following to our custom CSS as well as our child theme (I’m not even sure if I have the child theme set up correctly.)

    li#members-directory-form a {
    display: none;
    }

    #members-directory-form {
    display: none;
    }

    Nothing has worked so far in hiding the directory. I’m not sure if it’s something to do with the code that I’m using or what. I’m a pretty big noob when it comes to coding so if anyone has any suggestions or tweaks to the code to make it work, I’ll love you forever!

    Thanks,
    Brandon

    Avatar of shanebpdev
    shanebp
    Participant

    @shanebp

    You want to hide the listing of members on the Members page from everybody?
    Logged or not?

    Either way, it’s not something you want to do with css.

    Avatar of bkypes
    bkypes
    Participant

    @bkypes

    @shanebp

    Correct. I want them to still be able to search for members or find them in groups, but I want anyone to be able to just browse through all of the members.

    I’ve been going through the bp-members-screen.php file and deleting some of the code related to the directory form but nothing seems to take it off the page. I’ve also tried adding a few different lines of code to the bp-customs.php file and that hasn’t worked either.

    Avatar of Marcella
    Marcella
    Participant

    @marcella1981

    	<?php if(is_user_logged_in()) : ?>
    		<?php bp_get_template_part('members/members-loop'); ?>
    	<?php endif; ?>

    This will hide your members directory unless you are logged in to the site.

    Avatar of bkypes
    bkypes
    Participant

    @bkypes

    Hey @Marcella

    Thanks for posting that. I’ve added some code to my site to redirect all non-signed in users to the login page. Is it possible to change the first line of code to apply it to users that are logged in as well?

    Thanks!
    Brandon

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

You must be logged in to reply to this topic.