Hi,
I have created a Registration form, and custom fields for First Name and Last Name.
I folllowed the guide (https://metabox.io/create-wordpress-custom-user-profile-page-in-frontend/#more-17815) as much as possible.
Yet, the page looks different, and the first and last name are not copied to the user data.
This is the registration page: https://share.getcloudapp.com/NQuJmqPr
This is the shortcode: [mb_user_profile_register id="user-profile-default-fields" label_submit="Register" confirmation="Your account has been created successfully!" role="customer"]
This is the code:
$meta_boxes[] = [
'title' => esc_html__( 'Personal Info', 'text-domain' ),
'id' => 'user-profile-default-fields',
'post_types' => ['post'],
'context' => 'normal',
'priority' => 'high',
'fields' => [
[
'id' => $prefix . 'first_name',
'type' => 'text',
'name' => esc_html__( 'First Name', 'text-domain' ),
'required' => 1,
],
[
'id' => $prefix . 'last_name',
'type' => 'text',
'name' => esc_html__( 'Last Name', 'text-domain' ),
],
],
];
return $meta_boxes;
Please note that it is a subsite of multisite installation.