BuddyPress

How to Build Custom BuddyPress Profile Fields for Any Use Case

How to add custom BuddyPress profile fields in wp-admin or code: field types, groups, visibility, member types, a custom field type class, the avatar filter, save hooks and the xProfile REST API, checked on BuddyPress 14.5.6.

·11 min read
Custom BuddyPress profile fields: a profile edit form with Company, Experience level and a custom color field type

Custom BuddyPress profile fields are xProfile fields. You can add them without code under Users > Profile Fields in wp-admin, or in code with xprofile_insert_field_group() and xprofile_insert_field(). When none of the 13 built-in field types fits, you write a class that extends BP_XProfile_Field_Type and register it with the bp_xprofile_get_field_types filter.

That is the short answer. The rest of this guide shows each step with working code: field groups, visibility, member types, a complete custom field type, reading and writing data, the avatar filter people search for, the hooks that fire on save, and the REST API routes. We read every function and hook name below in the BuddyPress 14.5.6 source on 18 November 2026, and every PHP snippet passes php -l on PHP 8.5.

One version note before you copy anything. BuddyPress 14.5.6 shipped on 17 November 2026 with six security fixes, and its xProfile code is identical to 14.5.4. If you are still on an older 14.x, update first. For CVE-2026-1360 (CVSS 8.8), the CVE.org record published on 30 July 2026 lists BuddyPress versions up to 14.5.0 as affected, while Patchstack’s entry (checked 21 November 2026) lists versions up to 14.5.6 and shows no official patch. Run the current 14.5.6 release, but note that it is still listed as affected, so limit open registration, keep a firewall or mitigation rule in place, and re-check both pages.

How do you add custom profile fields in BuddyPress?

Go to Users > Profile Fields, pick a field group tab, click Add New Field, choose a type, and save. That is all most sites need. The screen exists when the Extended Profiles component is active, which it is by default.

  1. Open Users > Profile Fields in wp-admin. The first tab is the primary group that BuddyPress creates on install. It holds the Name field, which you cannot delete.
  2. Click Add New Field Group if you want a separate section, such as “Work” or “Mentoring”. Each group becomes its own tab on the member’s profile edit screen.
  3. Click Add New Field inside a group. Give it a name, an optional description, and pick a type from the dropdown.
  4. For a select box, radio buttons, checkboxes or a multi-select, add the choices in the options box that appears under the type.
  5. Set Requirement, Visibility and, if you use member types, the Member Types box in the right-hand column.
  6. Tick Use this field in the site registration form if new members should fill it in at signup. You can also drag it into the Signup Fields tab.

The registration step trips people up more than anything else on this list, so it gets its own section further down. If you are still choosing a registration plugin, our roundup of WordPress user registration plugins covers how each one treats BuddyPress fields.


What profile field types does BuddyPress 14 include?

BuddyPress 14 ships 13 field types. The table lists the type slug you pass in code, what members see, and the category the admin dropdown files it under. We copied the slugs from bp_xprofile_get_field_types() in the 14.5.6 source.

Type slug

What it is

Admin category

Good for

textbox

One-line text

Single Fields

Company, job title, city

textarea

Multi-line text, optional rich text

Single Fields

Short bio, “what I can help with”

number

Whole number

Single Fields

Years of experience

url

Web address

Single Fields

Portfolio, LinkedIn

telephone

Phone number

Single Fields

Contact number for a directory

datebox

Date picker with display formats

Single Fields

Birthday, member since

checkbox_acceptance

One checkbox that must be ticked

Single Fields

Accepting community rules

selectbox

Dropdown, one choice

Multi Fields

Experience level, region

multiselectbox

List box, several choices

Multi Fields

Skills, interests

radio

Radio buttons, one choice

Multi Fields

Short either/or answers

checkbox

Checkboxes, several choices

Multi Fields

Topics a member follows

wp-biography

Reads and writes the WordPress user bio

WordPress Fields

Keeping one bio across the site

wp-textbox

Reads and writes a WordPress user field

WordPress Fields

First name, last name, website

The two WordPress field types matter more than they look. They store data in the WordPress user tables, not in BuddyPress tables, so other plugins that read the user bio or website see the same value. Use them when a field must stay in sync with the rest of WordPress.


How do field groups, visibility and signup fields work?

A field group is a tab. Members fill in one group at a time on the profile edit screen, and the profile view shows each group as its own section. Groups also set the order fields appear in, so plan them around how members think, not how your database thinks.

Visibility levels

Each field has a default visibility, and you choose whether members may change it. BuddyPress registers these levels in the XProfile component:

Level ID

Label members see

Who can view the value

public

Everyone

Anyone, including logged-out visitors

loggedin

All Members

Any logged-in member

friends

My Friends

Confirmed friends only. Exists only when the Friends component is active

adminsonly

Only Me

The member and site admins

Visibility is enforced on the server. BP_XProfile_Group::get() removes hidden fields for the current viewer before anything is rendered, and the REST API uses the same function, so a hidden field does not leak through the API. You can add your own level with the bp_xprofile_get_visibility_levels filter, but you then also need to teach bp_xprofile_get_hidden_fields_for_user when to hide it.

Signup fields

Since BuddyPress 8.0, only fields listed in the Signup Fields tab appear on the registration form. BuddyPress stores that list as a signup_position field meta value. If a field is missing at signup, check that tab first.


How do you create BuddyPress profile fields in code?

Use code when you deploy the same fields to several sites, or when you want the field setup in version control. The snippet below creates a “Mentoring” group with a text field, a required dropdown, and a URL field that only logged-in members can see. It runs once and then stores a version flag so it never duplicates fields.

<?php
/**
 * Plugin Name: Mentor Profile Fields
 * Description: Creates a "Mentoring" profile field group once, with three fields.
 */

add_action( 'bp_init', 'mpf_create_fields', 20 );

function mpf_create_fields() {
	if ( ! bp_is_active( 'xprofile' ) || get_option( 'mpf_fields_version' ) === '1' ) {
		return;
	}

	$group_id = xprofile_insert_field_group(
		array(
			'name'        => 'Mentoring',
			'description' => 'Tell members what you can help with.',
			'can_delete'  => false,
		)
	);

	if ( ! $group_id ) {
		return;
	}

	// A plain one-line text field.
	$company_id = xprofile_insert_field(
		array(
			'field_group_id' => $group_id,
			'type'           => 'textbox',
			'name'           => 'Company',
			'description'    => 'Where you work today.',
			'field_order'    => 1,
		)
	);

	// A select box. Its choices are child fields of type "option".
	$level_id = xprofile_insert_field(
		array(
			'field_group_id' => $group_id,
			'type'           => 'selectbox',
			'name'           => 'Experience level',
			'is_required'    => true,
			'field_order'    => 2,
		)
	);

	foreach ( array( 'Junior', 'Mid-level', 'Senior' ) as $order => $label ) {
		xprofile_insert_field(
			array(
				'field_group_id' => $group_id,
				'parent_id'      => $level_id,
				'type'           => 'option',
				'name'           => $label,
				'option_order'   => $order + 1,
			)
		);
	}

	// A URL field that only logged-in members can see, and members cannot change that.
	$site_id = xprofile_insert_field(
		array(
			'field_group_id' => $group_id,
			'type'           => 'url',
			'name'           => 'Portfolio',
			'field_order'    => 3,
		)
	);

	if ( $site_id ) {
		bp_xprofile_update_field_meta( $site_id, 'default_visibility', 'loggedin' );
		bp_xprofile_update_field_meta( $site_id, 'allow_custom_visibility', 'disabled' );
	}

	update_option( 'mpf_fields_version', '1' );
}

Four details are easy to miss:

  • Dropdown, radio and checkbox choices are separate rows. Each one is a field of type option with parent_id set to the main field.
  • xprofile_insert_field() returns false without an error message if the type slug is not registered. Check the return value.
  • Visibility is field meta. The keys are default_visibility and allow_custom_visibility, and the second takes allowed or disabled.
  • xprofile_insert_field_group() takes a name, a description and can_delete. Older tutorials pass a group_order key, which the function ignores.

Checked on 18 November 2026 against BuddyPress 14.5.6, WordPress 7.1 and PHP 8.5 (syntax check).


How do you show different profile fields to different member types?

Assign the field to one or more member types. BuddyPress then shows the field only on profiles of members with that type, and only on their edit screen. You can create member types without code under Users > Member Types, which BuddyPress has had since version 7.0, or register them in code.

<?php
// Register a "mentor" member type, then limit the Mentoring fields to it.
add_action( 'bp_register_member_types', function () {
	bp_register_member_type(
		'mentor',
		array(
			'labels'        => array(
				'name'          => 'Mentors',
				'singular_name' => 'Mentor',
			),
			'has_directory' => 'mentors',
		)
	);
} );

add_action( 'bp_init', function () {
	if ( ! bp_is_active( 'xprofile' ) || get_option( 'mpf_types_version' ) === '1' ) {
		return;
	}

	$field_id = xprofile_get_field_id_from_name( 'Company' );
	$field    = $field_id ? xprofile_get_field( $field_id, null, false ) : null;

	if ( $field ) {
		// Shown only to members whose type is "mentor".
		$field->set_member_types( array( 'mentor' ) );
		update_option( 'mpf_types_version', '1' );
	}
}, 30 );

set_member_types() writes member_type rows into the xProfile meta table, so it runs once, not on every page load. The has_directory string gives the type its own members directory URL.

Here is the catch that fills support forums. A field limited to member types is hidden from the registration form, because a person signing up has no type yet. Either leave signup fields unrestricted, or tick Users with no member type in the field’s Member Types box. We cover the forum thread that shows this in the mistakes section below.


How do you register a custom profile field type in code?

Extend BP_XProfile_Field_Type, implement its two abstract methods, and add your class to the bp_xprofile_get_field_types filter. The example adds a “Color” type that stores a hex value and shows a small swatch on the profile. It is a full working plugin in two files.

The plugin file

<?php
/**
 * Plugin Name: Profile Color Field
 * Description: Adds a "Color" field type to BuddyPress profile fields.
 */

// Load the class once BuddyPress has loaded its own classes.
add_action( 'bp_include', function () {
	require_once __DIR__ . '/class-pcf-field-type-color.php';
} );

// Register the type. BuddyPress reads this list on bp_init, so add it early.
add_filter( 'bp_xprofile_get_field_types', function ( $types ) {
	$types['pcf_color'] = 'PCF_Field_Type_Color';
	return $types;
} );

The field type class

<?php
/**
 * File: class-pcf-field-type-color.php
 */

defined( 'ABSPATH' ) || exit;

class PCF_Field_Type_Color extends BP_XProfile_Field_Type {

	public function __construct() {
		parent::__construct();

		$this->category = 'Single Fields';
		$this->name     = 'Color';

		// Only accept a six-digit hex color such as #1a2b3c.
		$this->set_format( '/^#[0-9a-fA-F]{6}$/', 'replace' );
	}

	/**
	 * The input a member sees on the profile edit and signup screens.
	 */
	public function edit_field_html( array $raw_properties = array() ) {
		if ( isset( $raw_properties['user_id'] ) ) {
			unset( $raw_properties['user_id'] );
		}

		$r = bp_parse_args(
			$raw_properties,
			array(
				'type'  => 'color',
				'value' => bp_get_the_profile_field_edit_value(),
			)
		);
		?>
		<legend id="<?php bp_the_profile_field_input_name(); ?>-1">
			<?php bp_the_profile_field_name(); ?>
			<?php bp_the_profile_field_required_label(); ?>
		</legend>

		<?php do_action( bp_get_the_profile_field_errors_action() ); ?>

		<input <?php $this->output_edit_field_html_elements( $r ); ?> aria-labelledby="<?php bp_the_profile_field_input_name(); ?>-1">

		<?php if ( bp_get_the_profile_field_description() ) : ?>
			<p class="description"><?php bp_the_profile_field_description(); ?></p>
		<?php endif; ?>
		<?php
	}

	/**
	 * The preview shown on Users > Profile Fields in wp-admin.
	 */
	public function admin_field_html( array $raw_properties = array() ) {
		$r = bp_parse_args( $raw_properties, array( 'type' => 'color' ) );
		?>
		<input <?php $this->output_edit_field_html_elements( $r ); ?> disabled>
		<?php
	}

	/**
	 * No child options for this type, so hide the options box in wp-admin.
	 */
	public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) {}

	/**
	 * Show a small swatch next to the hex value on the profile.
	 */
	public static function display_filter( $field_value, $field_id = '' ) {
		if ( ! preg_match( '/^#[0-9a-fA-F]{6}$/', (string) $field_value ) ) {
			return '';
		}

		return sprintf(
			'<span style="display:inline-block;width:1em;height:1em;background:%1$s;vertical-align:middle"></span> %1$s',
			esc_attr( $field_value )
		);
	}
}

Why the load order matters. BuddyPress fires bp_include on bp_loaded (the plugins_loaded hook), and it builds its list of allowed types later, in setup_globals() on bp_init. Loading the class on bp_include means BP_XProfile_Field_Type already exists, and adding the filter at plugin load means the type is in the list before BuddyPress reads it. Hook either one later and xprofile_insert_field() rejects the type.

What each part does:

  • edit_field_html() and admin_field_html() are the two abstract methods. Every type must have both. The first renders the input on the edit and signup screens, the second renders the preview in wp-admin.
  • set_format() with 'replace' sets the validation pattern. is_valid() in the base class checks submitted values against it, so a bad value is rejected and the member sees the field error.
  • display_filter() is a static method BuddyPress calls when it prints the value inside the profile loop. It runs after BuddyPress has escaped the stored value, which is why we check the format again and escape the output ourselves.
  • admin_new_field_html() is stubbed out because a color has no child options. Types that do have options, like a custom select, override edit_field_options_html() instead and set $this->supports_options = true.

If you remove the plugin later, nothing breaks. BuddyPress falls back to a placeholder type for unknown slugs, and the stored values stay in the database until you delete the field.


How do you read and write profile field data in PHP?

Read with xprofile_get_field_data(), write with xprofile_set_field_data(), and print inside a members loop with bp_member_profile_data(). All three accept a field name or a field ID, and none of them checks visibility.

<?php
$user_id = bp_loggedin_user_id();

// Read: by field name or ID. Multi-value fields return an array unless you ask for 'comma'.
$company = xprofile_get_field_data( 'Company', $user_id );
$skills  = xprofile_get_field_data( 'Skills', $user_id, 'comma' );

// Write: returns true on success, false if the value fails the field type's validation.
$field_id = xprofile_get_field_id_from_name( 'Company' );
if ( $field_id && ! xprofile_set_field_data( $field_id, $user_id, 'Acme Ltd' ) ) {
	error_log( 'Company was not saved for user ' . $user_id );
}

// Inside a members loop (members-loop.php in your theme), print a field for each member.
// Note: neither function checks field visibility. Only print fields set to Everyone,
// or test bp_xprofile_get_hidden_fields_for_user() first.
if ( bp_has_members( 'per_page=20' ) ) {
	while ( bp_members() ) {
		bp_the_member();
		bp_member_profile_data( 'field=Company' );
	}
}

xprofile_set_field_data() runs the same validation as the profile form, so a value that fails the field type’s pattern is refused. Its fourth argument, $is_required, makes an empty value fail when set to true.

Finding members by a profile field value

BP_User_Query takes an xprofile_query argument shaped like a WordPress meta query. It supports field names or IDs, the usual comparison operators, and AND/OR relations. bp_has_members() accepts the same argument since BuddyPress 7.0.

<?php
// Members whose "Experience level" is Senior, 20 per page, newest first.
$query = new BP_User_Query(
	array(
		'type'           => 'newest',
		'per_page'       => 20,
		'page'           => 1,
		'xprofile_query' => array(
			array(
				'field'   => 'Experience level',
				'value'   => 'Senior',
				'compare' => '=',
			),
		),
	)
);

foreach ( $query->results as $user ) {
	echo esc_html( $user->display_name ) . '<br>';
}

echo 'Total: ' . (int) $query->total_users;

A note for large communities. The bp_xprofile_data table is indexed on field_id and user_id, not on the value. A query on one field scans every stored value for that field. On a few thousand members that is fine. On a hundred thousand, keep the query paginated as above, and consider a dedicated search plugin or a search index for free-text matching.


How does the bp_core_fetch_avatar filter work with profile fields?

bp_core_fetch_avatar filters the finished <img> tag for every avatar BuddyPress prints. It passes nine arguments; the first two are the ones you usually need: the HTML string and the $params array, which holds object (user, group and so on), item_id, type and the size. Use bp_core_fetch_avatar_url instead when you only want to change the image URL.

A common job is to pull a profile field into the avatar markup. This adds the member’s Company as a tooltip:

<?php
// Add each member's Company as the tooltip on their avatar, if the viewer may see it.
add_filter( 'bp_core_fetch_avatar', function ( $html, $params ) {
	if ( empty( $params['object'] ) || 'user' !== $params['object'] || empty( $params['item_id'] ) ) {
		return $html;
	}

	$user_id  = (int) $params['item_id'];
	$field_id = (int) xprofile_get_field_id_from_name( 'Company' );

	// xprofile_get_field_data() ignores visibility, so check it here.
	if ( ! $field_id || in_array( $field_id, array_map( 'intval', bp_xprofile_get_hidden_fields_for_user( $user_id ) ), true ) ) {
		return $html;
	}

	$company = xprofile_get_field_data( $field_id, $user_id );

	if ( ! $company || false !== strpos( $html, ' title=' ) ) {
		return $html;
	}

	return str_replace( '<img ', '<img title="' . esc_attr( wp_strip_all_tags( $company ) ) . '" ', $html );
}, 10, 2 );

Each call does one field lookup per avatar. BuddyPress caches both the field ID and the value for the request, and a persistent object cache keeps them between requests. Without one, a members directory showing 20 avatars runs 20 small queries on a cold page, which is worth knowing before you add more fields this way.

If you want more hook references in one place, our BuddyPress hooks cheat sheet lists the activity, member and group hooks next to these.


Which hooks fire when profile data changes?

Use xprofile_data_after_save when you need to react to every save. It fires from BP_XProfile_ProfileData::save(), so it runs for the front-end form, wp-admin, the REST API and your own code alike.

<?php
// Runs on every save path: the profile edit screen, wp-admin, the REST API and your own code.
add_action( 'xprofile_data_after_save', function ( $data ) {
	$company_id = xprofile_get_field_id_from_name( 'Company' );

	if ( (int) $data->field_id !== (int) $company_id ) {
		return;
	}

	// For example, push the new company to your CRM here.
	do_action( 'mpf_company_changed', (int) $data->user_id, maybe_unserialize( $data->value ) );
} );

Hook

Type

When it runs

xprofile_data_before_save / xprofile_data_after_save

Action

Around every single field value save, any path

xprofile_data_value_before_save

Filter

Change a value just before it is stored

xprofile_updated_profile

Action

After a member saves the front-end edit form; passes old and new values

xprofile_profile_field_data_updated

Action

Per field, on the front-end form and the wp-admin user screen

xprofile_field_after_save / xprofile_group_after_save

Action

After a field or group definition changes

xprofile_get_field_data

Filter

Change a value when it is read

bp_xprofile_get_hidden_fields_for_user

Filter

Change which field IDs a viewer cannot see

bp_xprofile_get_field_types

Filter

Add or remove field types

All eight names were checked in the 14.5.6 source. xprofile_updated_profile is useful for activity-style “profile updated” logic, but it does not fire for REST or wp-admin edits, so do not use it for data sync.


How do you get profile field data through the REST API?

BuddyPress 14 serves xProfile data under the buddypress/v1 namespace. The routes below come from the three xProfile endpoint classes in the 14.5.6 source.

Route

Methods

What it does

/wp-json/buddypress/v1/xprofile/groups

GET, POST

List or create field groups

/wp-json/buddypress/v1/xprofile/groups/<id>

GET, POST/PUT/PATCH, DELETE

Read, edit or delete one group

/wp-json/buddypress/v1/xprofile/fields

GET, POST

List or create fields

/wp-json/buddypress/v1/xprofile/fields/<id>

GET, POST/PUT/PATCH, DELETE

Read, edit or delete one field

/wp-json/buddypress/v1/xprofile/<field_id>/data/<user_id>

GET, POST/PUT/PATCH, DELETE

Read, save or clear one member’s value

Reading every field with a member’s values in one call, then saving one value with an application password:

# All fields with values for member 42 (visibility rules apply to the caller)
curl "https://example.com/wp-json/buddypress/v1/xprofile/fields?user_id=42&fetch_field_data=true"

# Save the Company field (ID 7) for member 42
curl -X POST "https://example.com/wp-json/buddypress/v1/xprofile/7/data/42" \
  -u "admin-user:abcd efgh ijkl mnop qrst uvwx" \
  -d "value=Acme Ltd"

The members endpoint also returns an xprofile block with every visible group, field and value, so a member card in an app needs one request, not one per field. Saving data is allowed only for the member themselves or a user with the bp_moderate capability, which admins have, and multi-value fields accept a comma-separated value. We go further into authentication and app patterns in our REST API for BuddyPress guide.

Checked on 18 November 2026. The namespace is v1 in every 14.x release; do not copy v2 URLs from development builds.


Common mistakes people report

These problems come up again and again on the BuddyPress and BuddyDev support forums. We paraphrase each one and link the thread. Dates are the thread dates; we checked each page on 18 November 2026.

  • Fields vanish from the registration form after adding member types. The fields were limited to member types, so BuddyPress hid them at signup. Ticking “Users with no member type” fixed it (BuddyDev forum, December 2021).
  • WordPress-type fields save in wp-admin but not from the front end. Social contact fields added by another plugin were only registered in wp-admin, so the front-end form dropped them. Registering the contact methods everywhere, or using the WordPress text field type, solved it (buddypress.org forum, about 2021).
  • One field group refuses to save. A member could save every group except the one holding fields from a third-party field type plugin. The moderator sent the poster to that plugin’s author, which is the usual answer when a custom type’s validation fails without a clear message (buddypress.org forum, about 2020).
  • A custom field type shows in one group but not another. A taxonomy field worked in the default group and not in a new one, and the thread stayed unresolved. Test custom types in more than one group, and as a non-admin, before launch (BuddyDev forum, April 2021).
  • Profile pages go blank after a major update. After BuddyPress 12 changed how URLs are built, some sites saw empty member pages even with BP Classic installed. Old code that builds profile links with bp_core_get_user_domain() should move to bp_members_get_user_url() (WordPress.org forum, early 2024).

Should you build custom fields in code or use a plugin?

Code is the right call when you need a type BuddyPress does not have, when fields must deploy the same way to several sites, or when other systems read and write the data. The admin screen is the right call for everything else, and it covers most communities.

A plugin makes sense for jobs that are bigger than one field. Repeating sections are the clearest case: a member with three degrees or four past jobs needs rows they can add, and core BuddyPress has no repeater type.

Need

Core BuddyPress

Option to look at

Standard text, date, select fields

Yes, admin screen

Nothing extra

A new field type (color, map, file)

Yes, with code

The class pattern above

Repeating rows (education, jobs)

No

BuddyPress Profile Pro, our add-on

Search members by field

Basic directory search

BP Profile Search (free)

Show fields on any page

Template functions

Shortcodes, see the plugin review below

A word on our own add-on, since we build it. BuddyPress Profile Pro adds repeater groups, extra types such as image and place autocomplete, and per-field privacy; on 18 November 2026 it was at version 2.6.0 (June 2026) and starts at $49 a year. It is a BuddyPress add-on, so we keep it compatible and fix bugs, but we do not promise new features for it. For placing field values with shortcodes, read our BP Profile Shortcodes Extra review.

If you are starting a new community rather than extending a BuddyPress one, look at BuddyNext, the community plugin our team builds. Its free version has member profiles and a directory, and advanced profile fields are part of Pro. It is not built on BuddyPress, so none of the xProfile code in this guide runs on it, and it has a smaller add-on ecosystem than BuddyPress. On an existing BuddyPress site, our BuddyX and Reign themes style the profile and field output without extra code.


Frequently asked questions

Where are BuddyPress profile fields stored in the database?

In three tables with your site prefix: bp_xprofile_groups for groups, bp_xprofile_fields for fields and their options, and bp_xprofile_data for each member’s values. Settings such as visibility and member types live in bp_xprofile_meta. The two WordPress field types store values in the WordPress user tables instead.

Can I make a profile field required?

Yes. Set Requirement to Required in the admin screen, or pass 'is_required' => true to xprofile_insert_field(). Keep required fields few; every one adds friction at signup.

How do I show a profile field in the members directory?

Edit your theme’s copy of members-loop.php and call bp_member_profile_data( 'field=Company' ) inside the loop, as in the read/write snippet above.

Can members choose who sees each field?

Yes, unless you lock it. Each field has a default visibility, and members can change it when allow_custom_visibility is allowed, which is the default.

Do custom field types work with the REST API?

Yes. The REST endpoints load the field type class and run the same validation and display filters, so a type registered as shown above saves and returns values over the API without extra work.

Will my custom fields survive a BuddyPress update?

Fields made in the admin screen or with the API functions are data, so updates keep them. Custom type classes depend on BP_XProfile_Field_Type, which has kept the same abstract methods since BuddyPress 2.0. Test on staging after each major release anyway.

Need a field setup that is bigger than a weekend of code, such as profile sync with a CRM or a member search across many fields? Our team builds BuddyPress profile systems for membership sites and professional networks, and small changes like login redirects as well. Tell us what your members need to share and we will suggest the simplest setup that works.

Part of the Wbcom Designs family

The all-in-one WordPress community stack

Also ours: wbcomdesigns.comvapvarun.combrndle.com