Site logo

Archived topic

WordPress user profile contact fields

3 replies · Started by _blank on April 25, 2018

Viewing posts 1–4 of 4

Hi,

I am trying to remove some user profile contact fields:

function remove_user_fields( $user_contact  ) {
    unset( $user_contact [ 'twitter' ] );
    unset( $user_contact [ 'facebook' ] );
    return $user_contact ;
}
add_filter( 'user_contactmethods', 'remove_user_fields' );

However, it doesn't work, so I was wondering if these fields are a part of GeneratePress theme and should be removed some other way?

Hi there,

It's not a part of GP, but that should work.

Maybe try replacing:

add_filter( 'user_contactmethods', 'remove_user_fields' );

With:

add_filter( 'user_contactmethods', 'remove_user_fields', 99 );

Cool, works :)

Thank you!

Awesome, glad I could help :)

This archived topic is closed to new replies.