Hi – I’ve installed the Profile Visibility Manager plugin and have a couple of users with profiles set to not show anywhere – yet they can still be seen.
The main place we want them invisible is the Group member list but they’re all visible.
Any ideas?
Hi Ian,
Thank you for using the plugin.At the moment, this is by design for non public groups. For public groups, they should be hidden based on their preference.
Do you want to enforce it for non public groups too? I can supply a line of code for the same. Please let me know.
Regards
BrajeshYes please.
In fact all we really want is for the group organiser to be invisible so the group member list is just the actual members. Thought we could do it using the plugin and having the organiser hide their profile.
Hi Ian,
Thank you.Please put this code in your child theme’s functions.php or in wp-content/plugins/bp-custom.php
/** * Reset flag for group members list. */ function bp_profile_visibility_custom_reset_conditions_for_group() { if ( function_exists( 'bp_profile_visibility_loader' ) ) { bp_profile_visibility_loader()->set_data( 'is_visible', false ); } } add_action( 'bp_before_group_body', 'bp_profile_visibility_custom_reset_conditions_for_group', 100 ); add_action( 'bp_before_group_membership_requests_admin', 'bp_profile_visibility_custom_reset_conditions_for_group', 100 ); /* for nouveau, we need to use the filter instead*/ add_filter( 'bp_after_group_has_members_parse_args', function ( $args ) { if ( empty( $args['group_id'] ) || ! function_exists( 'bp_profile_visibility_loader' ) ) { return $args; } bp_profile_visibility_loader()->set_data( 'is_visible', false ); return $args; }, 100 );
That will do it.
Regards
BrajeshThat worked perfectly, thanks Brajesh.
Might be an idea to include this as maybe a checkbox option for “enable for private groups” in the next version of the plugin?
Thanks!
Hi Ian,
Thank you for confirming.Sure, that we will be glad to add it in our future update.
Regards
BrajeshHi Ian,
hope you are doing well.Just letting you know that this behaviour is now part of Profile visibility 1.9.0
Regards
Brajesh
The topic ‘ [Resolved] Profile Visibility Manager not hiding profiles’ is closed to new replies.