I've added this code snippet to my functions.php
function my_new_contactmethods( $contactmethods ) {
$contactmethods['country'] = 'country';
return $contactmethods;
}
add_filter('user_contactmethods','my_new_contactmethods',10,1);
It works perfactly as I wanted. It show an extra field to fill up user country on user backend profile.
But it just a text field. Actually I want to show this field as a drop down menu which has all the countries.
How can I modify this code to get a country list dropdown menu ?