Skip to:
Content
Pages
Categories
Search
Top
Bottom

The filed “Who can see this field? keeps appearing when registration page loads


  • amkh
    Participant

    @amkh

    I have hidden the “Who can see this field?” from buddypress profile fields and registration page. But I notice whenever the registration page loads/refreshes and also profile, this field keeps keeps appearing for few seconds. Is there a way to completely disable this field appearing?

Viewing 5 replies - 1 through 5 (of 5 total)

  • Bit Boy
    Participant

    @bitboy

    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


    Bit Boy
    Participant

    @bitboy

    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


    amkh
    Participant

    @amkh

    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.


    Bit Boy
    Participant

    @bitboy

    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


    amkh
    Participant

    @amkh

    Thank you very much. It worked flawlessly.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar