Snippet: Add Custom User Profile Fields

Although wordpress user profile has pretty much every thing inside it. But in case if you want to add your own field to user profile pages.

Add following code to “functions.php”


the_author_meta('facebook', $current_author->ID);


function extra_userfields( $extra_contact ) {
    $extra_contact['twitter']       = 'Twitter URL';
    $extra_contact['facebook']       = 'Facebook URL';
    return $extra_contact;

This snippet is limited to add only text fields. If you want to use other form fields, check out our latest snippet that shows how to add any type of html form field to user’s profile.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>