Hi,
The user testimonials are available to all profile types in BuddyBoss. Is it possible to limit this to specific profile types?
Kind regards,
Maarten
Hi Maarten,
Thank you for using the plugin.
At the moment, the plugin does not support restrictions based on member type. Our offices will open on Tuesday(currently closed due to festive holidays here in India), I will ask one of our team members to update and add support for the member type based restrictions. Should be available by the end of the week.Regards
BrajeshHi Brajesh,
Wow, that sounds great! Great service! Would it be possible to add this to the User Circles plugin too?
Enjoy the holidays!
Maarten
Hi Maarten,
Thank you for the kind words.
For User circles, Please allow me to review it on Tuesday and get back to you if we can add the member type based restrictions.Thank you
BrajeshHi Brajesh,
Okay, thanks a lot! I will be looking forward to your response.
Kind regards,
Maarten
Hi Maarten,
Thank you for the patience.
We have released a new update.With this update, you may use a few lines of code to control who can have testimonials.
Here is an example
/** * Enable/Disable testimonials for certain member types. */ add_filter( 'bp_testimonial_enabled_for_user', function ( $enabled, $user_id ) { $allowed_member_types = array( 'student', 'teacher', ); $user_types = bp_get_member_type( $user_id, false ); if ( ! empty( $user_types ) && array_intersect( $allowed_member_types, $user_types ) ) { $enabled = true; } else { $enabled = false; } return $enabled; }, 10, 2 );
Please update the allowed_member_type with correct values an dput this code in your bp-custom.php(wp-content/plugins/bp-custom.php) or in your theme’s functions.php
Regards
BrajeshHi Maarten,
Marking it resolved as per our email communication.Regards
Brajesh
The topic ‘ [Resolved] Make user testimonials only available to specific profile types in BuddyBoss’ is closed to new replies.