Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Removing Fields from user profile

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #27592
    nutt318
    Member

    I’ve found this code to remove fields from the users profile and it works, I added the line to remove the website/url area but it wont remove that line.

    in the fucntions.php I added below code to the end of the file and it worked.

    Code:
    function remove_contact_fields( $contactmethods ) {
    unset($contactmethods[‘aim’]);
    unset($contactmethods[‘jabber’]);
    unset($contactmethods[‘yim’]);
    return $contactmethods;
    }
    add_filter(‘user_contactmethods’,’remove_contact_fields’,10,1);

    I then thought I could add this line and it would remove the website/url field, it didn’t work. What am I missing?

    Code:
    function remove_contact_fields( $contactmethods ) {
    unset($contactmethods[‘url’]);
    unset($contactmethods[‘aim’]);
    unset($contactmethods[‘jabber’]);
    unset($contactmethods[‘yim’]);
    return $contactmethods;
    }
    add_filter(‘user_contactmethods’,’remove_contact_fields’,10,1);

    Is there a better way to remove these fields and other fields?

    Thanks,
    Jake

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.