How to get user metadata for social media url?

Use get_user_meta( $user->ID, 'facebook' , true );

But let me clarify you, none of the social media fields are WP core fields. You are using Yoast SEO, and these fields are Yoast SEO features. FYI: I see Yoast SEO from your screenshot.

They are stored on the wp_usermeta table with the social media name in lowercase as the keys. For example, the Facebook URL is saved as facebook key, the Instagram URL is saved as instagram key.

I also misunderstood them as core WP usermeta fields.

Also, the fields could be from other plugins as well, so do plugin deactivation test to figure out the source of update_user_meta().

Leave a Comment