BuddyBoss Home – Web › Support Forums › Themes › Boss. theme › Modify Members Page
- This topic has 8 replies, 3 contibutors, and was last updated 9 years, 5 months ago by Josh.
Question
June 7, 2015 at 8:55 pm #41066@
AnonymousSo on the members page, instead of showing all of the options on the tabs (All, My Friends, etc), I’d like it to only show the results for My Friends only. Here’s a sample of the CSS I’m using to get rid of the all members tab:
#members-all{ display:none !important; }
That sucessfully removes the tab, however the results still display all members. Is there a way I can hide the all members tab AND make the My Friends tab be selected so that’s what shows when you go to the members page. I believe the All Members html has a class of “selected” that might have something to do with it.
Fyi, I’m also trying to do a similar thing on the activity page where I hide certain tabs, and want a different tab set as the default instead of the all activity page.
Answers
June 8, 2015 at 8:00 am #41086@alyssa-buddyboss
AlyssaParticipant@ionprojekt these selections are native to BuddyPress, it’s a bit complex to get one to be default. I suggest you contact BuddyPress for support on this one.
June 11, 2015 at 10:52 pm #41197@
AnonymousSo after much research and trial and error, I’ll put my solution here in case someone else ever needs it.
For the Members page, instead of just showing the user’s friends, I opted to just get rid of the members page altogether. I don’t really see it’s need and it didn’t fit in with my site. Here are the steps.
1. Enable root profiles. This will no longer put users into the members directory, and remove /members/ from the profile url. http://www.yoursite.com/members/user1 becomes http://www.yoursite.com/user1 which is something I’ve also been wanting. Create bp-custom.php in the plugins folder (if it doesn’t already exist). Add the following code into it:
<?php define ( 'BP_ENABLE_ROOT_PROFILES', true ); ?>
2. Remove access to the members page. Use redirection in htaccess to redirect if a user ever tries to go to the members page. Add the following to your htaccess:
redirect 301 /members http://www.WhereYouWantThemDirectedTo/
I could be wrong, but I believe redirecting as a 301 prevents a negative impact to your SEO because you’re telling search engines the page exists, it just was moved to different url. I’m redirecting back to my homepage if anyone tries to go to the members page on my site. It’s not in the navigation anywhere, but if they were really curious they could go to the direct link. Not anymore at least 🙂 Also, I found if you try to hide/modify access to the members page without enabling root profiles, you won’t be able to access any profiles since it relies on the members page. Enabling root profiles gets rid of that dependency.
The activity page was a little more in depth, but I finally got that to only show activity from the users network instead of sitewide activity. I also hid the all activity tab so they can’t choose to see things from outside of their network.
June 12, 2015 at 5:35 pm #41226@alyssa-buddyboss
AlyssaParticipant@ionprojekt looks good except instead of creating bp-custom.php add this code to your child theme functions.php file. Thanks for sharing!
June 15, 2015 at 8:47 am #41285@svaultsHello! @ionprojekt thanks for posting this! would you please be able to share how you got the activity stream limited as well? I’m trying to do the same thing and that would be much appreciated 🙂
June 16, 2015 at 11:23 pm #41333@
Anonymous@svaults No problem!
I found a plugin from this article: http://premium.wpmudev.org/blog/create-a-better-community-experience-with-the-new-buddypress-friends-only-activity-stream-plugin/
It’s a bit outdated but still seems to work just fine. I haven’t had the chance to look at the code in depth to see exactly what it’s doing and to make sure that it’s not excluding certain activity types or anything. Quick tests show it’s doing what I was looking for. You’ll have download the plugin then manually install it through your wordpress plugins page. Then after I installed it, I added some code to custom.css to remove the other tabs so users can’t click on all activity, etc. Basically I just have My friends and Groups tabs visible.
#activity-all{ display:none !important; }
Note, if you’re logged in as an admin, you’ll see all activity still. Test it using a non-admin account.
@tjchester Perhaps you guys can whip up a new and improved plugin for the boss community 😀
June 16, 2015 at 11:34 pm #41334@
Anonymous@tjchester I’ve successfully moved the code to functions.php in my child theme and removed the bp-custom.php and all is working fine. Thanks for the suggestion!
June 17, 2015 at 10:54 am #41341@alyssa-buddyboss
AlyssaParticipantNo problem 🙂
June 20, 2015 at 2:27 pm #41427@svaults@ionprojekt Thanks a lot for the link! I’ll have a look at it as soon as I can. Much appreciated
- The question ‘Modify Members Page’ is closed to new replies.