Skip to content
How to modify user profile fields in WordPress You are here:
Home Snippet How to modify user profile…
Home »
Snippets » How to modify user profile fields in WordPress
How to modify user profile fields in WordPress by
Leon , December 20, 2022
This hook is used to modify the fields on the user profile in wordpress. you can remove a field by using unset(), change name of field and adding new field.
/**
* Add / delete new user profile fields
*
*/
if ( ! function_exists( 'ld_modify_contact_methods' ) ) :
function ld_modify_contact_methods( $contactmethods ) {
$contactmethods['linkedin'] = __( 'Linked In' );
$contactmethods['youtube'] = __( 'YouTube' );
$contactmethods['instagram'] = __( 'Instagram' );
unset($contactmethods['facebook']);
unset($contactmethods['twitter']);
unset($contactmethods['googleplus']);
return $contactmethods;
}
add_filter('user_contactmethods','ld_modify_contact_methods', 10, 1);
endif;
If you want to use the added fields you may use the the_author_meta() function to get the data.
Go to Top
MASCO
X
Aldra
X
Physique
X
Carnvalley
X
Quantic Online
X
Marked Crafts
X
Crafties
X
Warhawk Esports
X We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it. Ok Reject Privacy policy