Does anyone know how to get access to user meta data on the wordpress backend? I'm trying to see if there is a "user_(linkedin, instagram, facebook, etc)_url". I'm working with a custom php file, and there is an arr called $data that is being created like this:

        $fields = [
            'headshotID' => 'medicus-headshot',
            'firstname' => 'first_name',
            'lastname' => 'last_name',
            'title' => 'medicus-title',
            'biography' => 'medicus-biography',
            'address1' => 'medicus-address1',
            'address2' => 'medicus-address2',
            'city' => 'medicus-city',
            'state' => 'medicus-state',
            'zip' => 'medicus-zip',
            'phone' => 'medicus-phone',

        foreach ($doctors as $doctor) {
            $data = [];

            foreach ($fields as $key=>$val) {
                $data[$key] = get_user_meta($doctor->ID, $val, true);

For the key-value pairs in $fields, it seems (I'm guessing) the "values" are the key names in the user metadata table, which contains the following per wordpress docs: ID, user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_activation_key, user_status and display_name (https://developer.wordpress.org/plugins/users/working-with-user-metadata/)

I've logged into phpmyadmin and have looked at the wp_users and wp_metadata tables and I do not see any columns for social media url's.

Is this user metadata table the same place where the values in $fields are being stored? If yes, are there also values for the user's social media information? I'm trying to display the user's info for their social media, specifically the url to their profiles. Is there a "user_linkedin_url", or "user_instagram_url", or anything like that?

I came across this post, but it wasn't very helpful. Maybe I missed something.

In the user wp backend image I attached, you'll see info for the user. I'm trying to display the user's social media url, like their instagram url for instance. How can I do that?

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.