Wordpress

Extend User Contact Fieds in WordPress

We can add lots of contact information, depending upon your needs. To extend user contact info, open the files and add in this code

<?php
function my_new_contactmethods( $contactmethods ) {
    // Add Twitter
    $contactmethods['twitter'] = 'Twitter';
    //add Facebook
    $contactmethods['facebook'] = 'Facebook';
 
    return $contactmethods;
}
add_filter('user_contactmethods','my_new_contactmethods',10,1);
?>

 

This is only a basic example and you can make it more complicated depending on your creative needs

You Might Also Like