Okay
  Print

I changed the name of a BuddyPress profile field or group and now its not displaying on the site

The theme uses the BuddyPress xProfile groups and fields to allow site members to enter information about themselves, like bio, personal, interests, social links and account information.


To be able to show each xProfile field group and its respective fields in different settings pages and widgets in the members profiles, the theme has to query them by their name.

This creates problems if users need to edit group or field names for translations purposes, as the theme won't be able to find and display the group or field information if the name is not the one it is expecting.To solve this and allow users to translate them, we have included a new customizer section with this update ("Vikinger Settings" -> "xProfile Groups / Fields").

To understand how to edit the profile groups and fields for translation purposes, we need to detail how the theme uses the group names.

xProfile group names consist of a prefix part (i.e. "Profile") followed by an underscore (_) followed by the subgroup name ("Bio"): "Profile_Bio".

The prefix part (in this example "Profile") is used to identify on which settings page the group and all its fields will be displayed in, to allow members to edit their information:

  • "Profile" prefix: groups and fields display on the member profile info settings screen (Profile_Bio, Profile_Personal, Profile_Interests).
  • "Social" prefix: groups and fields display on the member social settings screen (Social_Links).
  • "Account" prefix: groups and fields display on the member account info settings screen (Account_Info).

The prefix part of the xProfile group names shouldn't be changed, otherwise the sub groups and fields won't display correctly in the settings pages.

The subgroup name part (in this example "Bio") is used to identify on which member profile page widget the subgroup fields are going to be displayed in (in this case, the "About Me" widget).

This subgroup in particular also has a special case with its "About" xprofile field, which is displayed differently from the other fields (text only at the top of the widget after the title).

With this update, users can now edit all subgroup names from the backend "Users" -> "Profile Fields" page to translate them and then enter that same name on the respective customizer "Vikinger Settings" -> "xProfile Groups / Fields" option.

This allows the theme to query the subgroup using the new name and display the information correctly on each widget.

As we mentioned before, the "Profile_Bio" "About" field is a special case and if changed, its new name has to be entered in the customizer.

Any other xProfile field names can be changed and will display correctly without the need to enter their new names in the customizer.

To summarize:

  • xProfile group name prefix shouldn't be changed.
  • xProfile subgroup names can be changed to translate them, but the new subgroup name has to be entered in the respective customizer "Vikinger Settings" -> "xProfile Groups / Fields" option.
  • Any xProfile field names can be changed to translate them without further changes, except the "Profile_Bio" "About" field whose new name has to be entered in the respective customizer "Vikinger Settings" -> "xProfile Groups / Fields" option.