Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: [Resolved] Double profile fields??

@shanebp

Moderator

Don’t replace the code.

Use this function, and change ‘Country’ to the name you gave the field.

function naisai_make_field_delete() {
	global $wpdb;
	
	$table = $wpdb->prefix . "bp_xprofile_fields"; 
	$wpdb->query( "UPDATE $table SET can_delete = 1 WHERE name = 'Country'" );
	
}
add_action( 'bp_ready', 'naisai_make_field_delete' );

Then visit your site’s home page.
Then go to that field in wp-admin and you should see a Delete link.
If you have more than one field you want to Delete, then change the name in the function and repeat the process.
When you are done – remove the function.

Then, if you want, get the code from the gist and run again.

Skip to toolbar