• Resolved ultimateuser

    (@ultimateuser)


    The birthday field didn’t show up on my BP register page so I followed these instructions:

    before:

    <?php do_action( ‘bp_custom_profile_edit_fields’ ) ?>

    Write this:

    <?php do_action( ‘bp_custom_profile_edit_fields_pre_visibility’ ); ?>

    It’s working now, however the Privacy options field (“The field can be seen by anyone”) is now showing before the birthday field (all the others are shower after the specific fields).

    How can I get the Privacy options field to show after the birthday field?

    https://www.ads-software.com/plugins/buddypress-xprofile-custom-fields-type/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author donmik

    (@atallos)

    Hi,

    You just need to write the hook a little above. Search the code responsible of displaying privacy options, it looks like this:

    <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
        <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
            <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></a>
        </p>
    
        <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
            <fieldset>
                <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>
    
                <?php bp_profile_visibility_radio_buttons() ?>
    
            </fieldset>
            <a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a>
    
        </div>
    <?php else : ?>
        <p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
            <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?>
        </p>
    <?php endif ?>

    Write the hook <?php do_action( ‘bp_custom_profile_edit_fields_pre_visibility’ ); ?>, before the previous code and it should work.

    Thread Starter ultimateuser

    (@ultimateuser)

    Thank you for the prompt reply, its working now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Privacy options for birthday before field’ is closed to new replies.