BuddyBoss Home – Web › Support Forums › Plugins › BuddyPress Member Types › How to Remove "Teacher" and "Student" Member Types from Directory Filters?
Tagged: member-types
- This topic has 4 replies, 2 contibutors, and was last updated 8 years, 1 month ago by Varun Dubey.
Question
March 2, 2016 at 4:40 pm #61183@dbaylessI’m using Boss/Social Learner/Sensei/BP for Sensei. Apparently by default, BP for Sensei creates two member types (Teacher and Student) and includes those types in the directory filter at the top of the /members/ page.
I used the BuddyPress Member Types plugin to create two new member types – Guides and Members, which I’d like to use in lieu of the default Teacher/Student types. I’ve successfully designated my current users as a Guide or Member, as show in the attached screenshot.
What is the best way for me to remove the Teacher and Student directory filter options? I’d like to have the filter bar read All Members/My Friends/Guides/Members.
Answers
March 6, 2016 at 5:48 pm #61766@dbaylessAny suggestions on how I might hide these member types from the directory filters?
March 8, 2016 at 12:29 pm #62099@vapvarunHi @dbayless
you can use following function inside child theme functions.php to remove them.function bp_sensei_remove_tabs() { global $bp, $BUDDYPRESS_SENSEI; remove_action( 'bp_members_directory_member_types', array( $BUDDYPRESS_SENSEI->bp_sensei_loader, 'bp_sensei_members_directory' ) ); } add_action( 'bp_init', 'bp_sensei_remove_tabs');
Regards
Varun DubeyMarch 9, 2016 at 11:37 am #62236@dbaylessThank you, Varun. I’m having trouble getting the code to work. I’ll follow-up if I can’t. In the meantime, I appreciate your suggestions, as always.
March 15, 2016 at 12:36 am #63044@vapvarunHi @dbayless, Hopefully above code worked fine. I have also tested on sensei install and it worked fine.
I will close this topic, feel free to create new for any further queries.
Regards
Varun Dubey
- The question ‘How to Remove "Teacher" and "Student" Member Types from Directory Filters?’ is closed to new replies.