Hi,
How did you disable the option? Are you using css to do it?
There are two ways to do it
1. Using css
2. editing template file(register.php and keeping a copy in your theme’s buddypress/members directory)
I will prefer the first approach as it will not be much work on a site admin’s part.
.register-page .signup-form .editfield .field-visibility-settings,
.buddypress-wrap .standard-form .field-visibility-settings-header {
display:none;
}
Please visit Dashboard->Appearance->Customize menu then open “Additional Styles” and add those lines.
Does that work?
Best Regards
B
Btw, The above code disables the toggle option on profile edit too.
To only change it on registration page, Please use the below code instead
.register-page .signup-form .editfield .field-visibility-settings,
#register-page .standard-form .field-visibility-settings-header {
display:none;
}
Best Regards
B
Thanks for your reply,
I needed for both profile edit and register page both. I used CSS earlier but inserted that into style.css of my child theme. However now I inserted again in the Appearance > Customize > Additional CSS. But the behavior is same. The page at the time of loading shows the field and toggle for few seconds and then vanishes. This make the look of the page very unprofessional. I do not want it to show on page for even a moment at the time of loading.
In that case, you can put it in your bp-custom.php or your theme/child theme’s functions.php
/**
* Start buffering the visibility template.
*/
function bitboy_start_buffering_visibility_template() {
ob_start();
}
add_action( 'bp_custom_profile_edit_fields_pre_visibility', 'bitboy_start_buffering_visibility_template', -1 );
/**
* End buffer and discard.
*/
function bitboy_end_buffering_visibility_template() {
ob_end_clean();
}
add_action( 'bp_custom_profile_edit_fields', 'bitboy_end_buffering_visibility_template', 1000 );
It will remove the visibility options completely.
Best Regards
B
Thank you very much. It worked flawlessly.