Adding buddypress xprofile fields in modern theme ajax registration

In this tip we will add Gender and Location fileds in the ajax registration form :
Please refer the code and add it to the wplms-customizer.php file at the end and before “?>” in wplms customizer plugin :

Please note the strings “Gender”  and “Location” from buddypress xprofile and provide the type also in the above code according to your field type .
like in above code for location ‘field’ => ‘text‘ and ‘id’=> ‘Location‘,
Note that the Gender is a select box type for this you need to add a “option” element in array  like this in the above code :

Was this article helpful?


Leave A Comment?