Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Possible Duplicate:
How To Add Custom Form Fields To The User Profile Page?

I'm current removing some user fields with the following code in the functions.php file:

function adjust_contact_methods( $contactmethods ) {
  return $contactmethods;

I'd like to additionally remove the website and Google+ fields, but I can't find the correct keyword. Any advice?

share|improve this question

marked as duplicate by Chris_O, kaiser, Rarst Oct 2 '12 at 21:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

The following function is from WordPress 3.4.1 default installation source file 'user.php' starting at line 1481.

 * Set up the default contact methods
 * @access private
 * @since
 * @param object $user User data object (optional)
 * @return array $user_contactmethods Array of contact methods and their labels.
function _wp_get_user_contactmethods( $user = null ) {
    $user_contactmethods = array(
        'aim' => __('AIM'),
        'yim' => __('Yahoo IM'),
        'jabber' => __('Jabber / Google Talk')
    return apply_filters( 'user_contactmethods', $user_contactmethods, $user );

Additional fields might have been set vi addfilter hooks.

add_filter('user_contactmethods', 'my_user_contactmethods');  

function my_user_contactmethods($user_contactmethods){  

  $user_contactmethods['twitter'] = 'Twitter Username';  
  $user_contactmethods['facebook'] = 'Facebook Username';  

  return $user_contactmethods;  

$user_contactmethods is an array.

Try the following code to output the array in one of your pages.

echo "<pre>";
echo "</pre>";

You will see an array. figure out the key related to Google Plus and unset it.

share|improve this answer
up vote 1 down vote accepted

Is what I needed to add to my above code.

share|improve this answer
Why not accept this as the answer? – Brian Fegter Aug 30 '12 at 21:06
Because it wouldn't let me yet. Had to wait. – Mike Cole Aug 30 '12 at 21:12
Gotcha. Forget how stringent SE is sometimes. :) – Brian Fegter Aug 30 '12 at 21:13
Remind me in 4 hours. :-) – Mike Cole Aug 30 '12 at 21:13
WordPress SEO plugin is adding a few additional contact methods (googleplus, twitter and facebook). In order to unset googleplus, you'd need to add the filter with a higher number in the priority parameter. For instance add_filter( 'user_contactmethods', 'magn_unset_contactmethods', 1000 ); – julianm May 6 at 15:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.