Add Additional Contact Methods to User Profiles

[ad_1]

By default WordPress allow authors to display some information about themselves, such as a website URL, email address, a short bio and their IM contacts, but it is missing important social media networks like Facebook, Twitter, linkedin and Google+. It’s good option to display social media profile page along with author bio because your readers might also want to connect and follow their favorite authors on these social media networks. And it’s fairly very easy to add additional contact methods to user profile pages, so you don’t have any more excuses.

With the following code snippet, you can add some additional contact methods asking your authors for their profile on social media networks. Just paste this code to your theme’s functions.php file.

// add additional contact methods to user profiles
function wcs_user_contact_methods( $user_contact_methods ) {

    // add Twitter profile
    $user_contact_methods['twitter'] = 'Twitter Profile';

    // add Facebook profile
    $user_contact_methods['facebook'] = 'Facebook Profile';

    // add Google+ profile
    $user_contact_methods['googleplus'] = 'Google+ Profile';

    return $user_contact_methods;
}
add_filter( 'user_contact_methods', 'wcs_user_contact_methods' );

In this example, I added Twitter, Facebook and Google+ profiles to additional contact methods. You can add any other social media networks similar way.

[ad_2]

Leave a Reply

Random Post Selection ::

Recent Posts

Unlock Unlimited Downloads