Display custom gender field choices on Profile Card in Member Directory

You can display the gender field in the user's profile cards in the member directory. Go to wp-admin> Ultimate Member> Member Directories> Edit a Member Directory and go to Profile Card Section. 

By default, the gender field consists of only Male and Female options. However, you can add or edit gender choices in the field settings, but the additional option will still not display in the member directory profile card. You need to use a custom code.

You can try and use the sample code below, and it will accept all additional gender choices you have added to your registration form gender field and make them searchable on the membership page. Genders without search hits are removed from the membership page dropdown by UM:

Note: Add the code snippet to your child theme functions.php file or add it to the “Code Snippets” plugin.

Warning: We have created this code example to provide guidance and to make it easier for you to implement this code into your website. However, we are not able to provide any support when it comes to customizing the plugin. If you need help implementing this code, please hire a developer.