The best way is on the user profile page using the contact methods extension:
add_filter( 'user_contactmethods', 'more_contactmethods' );
function more_contactmethods( $contactmethods ) {
$contactmethods['twitter'] = 'Twitter username';
$contactmethods['facebook'] = 'Facebook URL';
return $contactmethods;
}
This adds fields to the user profile page for those social networks. You can have as many as you like, then you can use that data in a widget or via a template tag in the following way:
$twitter = get_usermeta( $user_id, 'twitter' );
Actually writing the widget or template tag is a separate question though.
Related Posts:
- Displaying additional User Contact Information
- How to keep sharing stats after creating 301 redirects?
- Individual Widgets per Page
- Having different sidebar content for MANY pages?
- Get custom field values into the sidebar/widget?
- custom field with total count of Facebook likes, comments and shares
- How do you create dynamic customised sections in WordPress?
- Creating a custom menu/widget area
- Creating a widget with a number of custom fields
- How to display image inside container of custom made widget
- Want to make A CSS if meta key value is empty
- how to display a widget only on a page where the custom field is defined?
- What’s the best way to implement custom widgets on a per post basis?
- Best Way to get facebook share count and update using wp_schedule_event or any other method
- No result update a custom field using wp_schedule_event
- Is there a way to dump all registered sidebar/widget?
- Display custom widget value in header.php
- Add custom data (field) to sidebar widgets for later display
- Custom field outside the loop and inside an array
- Register author, facebook connect, publish posts from front end
- WP_query returns error when used for custom widget
- Add class from custom field into widget class
- Running a Gallery Shortcode in a Custom Fields Widget
- How to Pull Out Twitter Summary Data in other areas of my template?
- I would like to display different text on different pages
- How to check if custom field exists in this widget query
- Add fields to edit in custom widget
- Custom post meta field effect on the performance on the post
- Difference between meta keys with _ and without _ [duplicate]
- Orderby meta_value only returns posts that have existing meta_key
- Can I query custom meta data through WP_Query
- Add custom objects/entities to WordPress
- Change behavior of “Insert into Post” based on attachment metadata
- Is there a way to do multiple ordering on a multiple meta_query?
- searching in custom meta field
- Plugins won’t recognize my plugin’s hidden custom fields
- Store JSON in a custom field
- Multiple custom fields with the same name
- Adding Properties to User Profile and Displaying in List
- Execute/Parse Shortcode in Native WordPress Custom Field Value Field
- Displaying Custom Fields on Post with Genesis Child Theme
- Custom fields: In what order are they saved into the DB?
- How to add a title field in comments?
- Inserting Schema Markup (JSON-LD) Manually with Custom Fields or any Better Ways?
- BuddyPress – Hook to Update Custom Profile Fields [closed]
- Custom Fields Code not echoing whats in the value field
- Metabox will not save
- Masking Affiliate URL using $post_slug after “/go/”
- load custom fields on click
- How to wrap meta values seperated by comma in ? [closed]
- Create WordPress shortcode with php code inside
- How to create a Custom Meta Box with Name/Value Admin User Input Fields?
- Custom Fields box in the post editor: Replace textareas with input elements
- Passing args to WP_User_Query am I using meta correctly?
- Custom fields attached to a page template only show on edit screen when page is saved
- Value from custom field is not being displayed?
- wrap text around custom fields array
- Displaying page image in the footer automatically
- Hide custom column in admin template screen (Elementor) [closed]
- ORDER BY custom field value out of where clause
- How can i retrive a text from a custom field
- List custom field values in alphabetical order without repetition
- ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?
- WordPress custom fields feature is missing in my installation
- Is it possible to populate a custom field with content from a page
- Save all custom field data into one “master” custom field
- Change a custom field value after X number of seconds
- How to put forward a blog post
- Plugin or shortcode for ISBN number?
- Jquery on custom-field backend
- How to add social buttons like facebook and twitter in the footer of a theme?
- Display latest post depending on Meta Box content
- WP-eComerce Advance Meta Tag data in descending order [closed]
- Custom fields won’t update
- Replacing custom field with shortcode
- WPAlchemy issue when using 2 select menus with the same values inside a repeating group
- Populate custom checkout fields with data from previous orders
- Making custom meta box required (with error message if not filled in) on Gutenberg
- Is the use of many custom field not good for server?
- Changing form action based on selected value
- Very large list of options for BuddyPress profile fields
- Can you generate a featured image from two images from custom fields?
- Search fails when using the radio buttons
- Change Order of Sections Using Custom Fields
- How to add content with a filter when there’s no content in the editor
- Order a query by meta_value and then by post_date
- custom field functionality
- Media Attachment Custom Meta Fields not saving in Media Uploader when using jQuery UI Autocomplete
- How to overwrite a value for a custom field?
- WordPress archives by custom field and date
- Decouple page name from page title
- Custom Field add markup to line breaks
- Use Metabox to enter Post Title
- Include custom fields into the content of a regular page
- Bypassing a Form Options
- How to implement jquery-ui autocomplete into custom fields?
- extra post fields for url + youtube video / implementation
- i want to send email on custom post field (job_status == 2) but it is not working
- How to create a searchable database with a single-field search box at the front end? [closed]
- How to apply Local Business Google Schema dynamically on a Custom Post single template?