Just some more info, I have just located the line:
<?php do_action( 'bp_custom_profile_edit_fields_pre_visibility' ); ?>
within edit.php (part of DynamiX Theme), but fields are not shown on register page 🙁
Plugin Author
donmik
(@atallos)
For register page, you need to add this hook to register page and not edit profile form. If you read the faq you have read you need to put this code in edit.php and register.php.
Thanks for answering and apologize for not reading what you wrote about adding the code to both php-files. For now Xprofile fields are shown on the edit profile page (via edit.php) but not on the registration page. I think this has something to do with placing the code on the right place but I did not succeed. Not even after trying several sections where I’ve placed it including between <form> and </form>. Could you please be more specific about “just before the code of visibility settings”?
Plugin Author
donmik
(@atallos)
You need to search this code:
<?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 ?>
Just before this code you need to write:
<?php do_action( 'bp_custom_profile_edit_fields_pre_visibility' ); ?>
Problem solved, thanks for your support and the great plugin!