Skip to main content
Tweeted twitter.com/#!/StackWordPress/status/391677733790814208
tabsss
Source Link
brasofilo
  • 22.1k
  • 8
  • 69
  • 264

How can I modify my following code to add some description text under the input fields? I tried modifying it as you can see with the facebook url field but the text shows up under the field label and not the actual input field --

function modify_contact_methods($profile_fields) {
 
    // Add new fields
    $profile_fields['address'] = 'Address';
    $profile_fields['city'] = 'City';
    $profile_fields['state'] = 'State';
    $profile_fields['zipcode'] = 'Zip Code';
    $profile_fields['phone'] = 'Phone Number';
    $profile_fields['fax'] = 'Fax';
    $profile_fields['gplus'] = 'Google+ URL';
    $profile_fields['twitter'] = 'Twitter URL';
    $profile_fields['facebook'] = 'Facebook URL <br /><span style="clear:both;">Ex: www.facebook.com/username</span>';
    // Remove old fields
    unset($profile_fields['aim']);
    unset($profile_fields['yim']);
    unset($profile_fields['jabber']);

    return $profile_fields;
}
add_filter('user_contactmethods', 'modify_contact_methods');

How can I modify my following code to add some description text under the input fields? I tried modifying it as you can see with the facebook url field but the text shows up under the field label and not the actual input field --

function modify_contact_methods($profile_fields) {
 
    // Add new fields
    $profile_fields['address'] = 'Address';
$profile_fields['city'] = 'City';
$profile_fields['state'] = 'State';
$profile_fields['zipcode'] = 'Zip Code';
$profile_fields['phone'] = 'Phone Number';
$profile_fields['fax'] = 'Fax';
$profile_fields['gplus'] = 'Google+ URL';
$profile_fields['twitter'] = 'Twitter URL';
$profile_fields['facebook'] = 'Facebook URL <br /><span style="clear:both;">Ex: www.facebook.com/username</span>';
    // Remove old fields
    unset($profile_fields['aim']);
unset($profile_fields['yim']);
unset($profile_fields['jabber']);

    return $profile_fields;
}
add_filter('user_contactmethods', 'modify_contact_methods');

How can I modify my following code to add some description text under the input fields? I tried modifying it as you can see with the facebook url field but the text shows up under the field label and not the actual input field --

function modify_contact_methods($profile_fields) {
    // Add new fields
    $profile_fields['address'] = 'Address';
    $profile_fields['city'] = 'City';
    $profile_fields['state'] = 'State';
    $profile_fields['zipcode'] = 'Zip Code';
    $profile_fields['phone'] = 'Phone Number';
    $profile_fields['fax'] = 'Fax';
    $profile_fields['gplus'] = 'Google+ URL';
    $profile_fields['twitter'] = 'Twitter URL';
    $profile_fields['facebook'] = 'Facebook URL <br /><span style="clear:both;">Ex: www.facebook.com/username</span>';
    // Remove old fields
    unset($profile_fields['aim']);
    unset($profile_fields['yim']);
    unset($profile_fields['jabber']);

    return $profile_fields;
}
add_filter('user_contactmethods', 'modify_contact_methods');
Source Link
730wavy
  • 193
  • 1
  • 12
  • 45

Add description text under input field for new profile fields

How can I modify my following code to add some description text under the input fields? I tried modifying it as you can see with the facebook url field but the text shows up under the field label and not the actual input field --

function modify_contact_methods($profile_fields) {

    // Add new fields
    $profile_fields['address'] = 'Address';
$profile_fields['city'] = 'City';
$profile_fields['state'] = 'State';
$profile_fields['zipcode'] = 'Zip Code';
$profile_fields['phone'] = 'Phone Number';
$profile_fields['fax'] = 'Fax';
$profile_fields['gplus'] = 'Google+ URL';
$profile_fields['twitter'] = 'Twitter URL';
$profile_fields['facebook'] = 'Facebook URL <br /><span style="clear:both;">Ex: www.facebook.com/username</span>';
    // Remove old fields
    unset($profile_fields['aim']);
unset($profile_fields['yim']);
unset($profile_fields['jabber']);

    return $profile_fields;
}
add_filter('user_contactmethods', 'modify_contact_methods');