I want to add some more profile fields to WordPress. It works fine with normal text box:
<input type="text" name="gender" id="gender" value="<?php echo esc_attr( get_the_author_meta( 'gender', $user->ID ) ); ?>" class="regular-text" /><br />
But of course, I don’t want my users to enter “male” or “female”. So I need a select box! 🙂
May you please help me with how I have to change the code above to get a select box?!
Thanks a lot!
Place the following code in your functions.php