Hi @danbp,
Thanks for your reply.
I tried that & the outcome was the same, ie the fields are hidden but the ‘Base’ profile group field is the same, like this
I guess a solution would be to put all fields in the ‘Base’ group & delete the “User Info” group, but this would mean that all fields would show up on registration (albeit, not all ‘required’). This is something I wanted to avoid, as I want to make it as quick & easy as possible for visitors to sign up – I don’t want to overwhelm them on sight of the registration form.
Have you tried what’s explained for the second example ? Ie.:
// remove field from edit tab
if( bp_is_user_profile_edit() ) {
$retval['exclude_group'] = '1'; // ID's separated by comma
}
If not enough, you use CSS display:none;
for the BASE markup on profile edit tab.
@danbp
Thanks again.
I’d missed the second example, but, unfortunately, it doesn’t solve the issue.
If not enough, you use CSS display:none;
for the BASE markup on profile edit tab.
I attempted to do this but I’m unable to target the BASE group without also affecting the USER INFO group
I noticed, too, that the “hide fields or field group to members, but not to site admin” code was preventing user registrations from going through, for some reason. It was quickly redirecting users to the home page, rather than a success or failure message page, when they clicked on the “complete sign up” button.
I think what I’ll have to do is put all fields in the BASE group & go with what @shanebp suggested in the thread I linked in my first post. & hope that potential subscribers aren’t put off by the registration form.
@danbp
I’m returning to this as it’s still bothering me.
I want to use your suggestion of CSS display:none;
, but for both the Base & User Info groups. This would be the ideal solution.
The problem with doing this is that, when I click on Profile -> Edit, the Base group is displayed first by default & there would be no way of getting to the ‘User Info’ group.
Is there a way of getting the ‘User Info’ group to display when I click on Profile -> Edit?
A bump for this.
Is there a way of getting new field groups (in this case, ‘User Info) to load before the Base field group when users select to edit their profile?
I attempted to do this but I’m unable to target the BASE group without also affecting the USER INFO group
I have the same issue.
This isn’t the most elegant solution but, assuming the Base group is the first in the Tabs array, it works.
Needs to be added to your theme’s functions.php file.
function bp_profile_remove_base_tab ( $tabs ){
unset($tabs[0]);
return $tabs;
}
add_filter( 'xprofile_filter_profile_group_tabs', 'bp_profile_remove_base_tab' );