Add custom fields in profile/user page

To add a additional field in profile page of PZ Frontend Manager Plugin. Using the filter pzfm_personal_info_fields the filter returns an array of fields used in profile page ( id, label, field, required, read-only, options, and wrapper class).
                
/**
* Add Additional Field(s) in User/Profile Page.
*/
function custom_fb_url($fields){
$fields[‘facebook’] = array(
‘id’ => ‘facebook’,
‘label’ => ‘Facebook URL’,
‘field’ => ‘text’,
‘required’ => false,
‘read-only’ => false,
‘options’ => array(),
‘wrapper_class’ => ‘facebook col-md-12 mb-3’
);

return $fields;
}

add_filter(‘pzfm_personal_info_fields’, ‘custom_fb_url’);
        
Parameters of Fields Array:
  • ID – Unique ID for the field.
  • label – Text to display above the field.
  • Field – Type of field to use (text, select, textarea, email, hidden, password).
  • Required – If field is required.
  • Read Only – Field only to display and not editable.
  • Options – Options if the field is select.
  • Wrapper Class – Classes used in the field.
  Additional Field-Project Zealous