{"id":72627,"date":"2012-02-23T12:00:30","date_gmt":"2012-02-23T17:00:30","guid":{"rendered":"http:\/\/wpmu.org\/?p=72627"},"modified":"2012-02-23T12:05:44","modified_gmt":"2012-02-23T17:05:44","slug":"remove-aim-yahoo-and-jabber-fields-from-the-wordpress-profile-page","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/remove-aim-yahoo-and-jabber-fields-from-the-wordpress-profile-page\/","title":{"rendered":"Remove AIM, Yahoo, and Jabber Fields from the WordPress Profile Page"},"content":{"rendered":"<p>There are three fields on the WordPress profile page that many people seem to have little use for and so want to remove to cut down on the clutter. They are the fields for AIM, Yahoo IM, and Jabber.<\/p>\n<p><a rel=\"lightbox[72627]\" class=\"blog-thumbnail\" href=\"https:\/\/wpmudev.com\/blog\/remove-aim-yahoo-and-jabber-fields-from-the-wordpress-profile-page\/default-boxes\/\" rel=\"attachment wp-att-72629\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-72629\" title=\"default-boxes\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/02\/default-boxes.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"665\" height=\"307\" \/><\/a><\/p>\n<p>At the same time, many wonder why such popular sites such as Facebook and Twitter don\u2019t have default spots on the profile page.<\/p>\n<p>If that\u2019s your case too, there\u2019s an easy way to both remove the AIM, Yahoo, and Jabber fields and add a Facebook and Twitter field. Simply put the following code in your functions.php file: <strong>Appearance &gt; Editor &gt; Theme Functions (functions.php)<\/strong>.<\/p>\n<p>&nbsp;<\/p>\n<pre>function edit_contactmethods( $contactmethods ) {\r\n $contactmethods['facebook'] = 'Facebook';\u00a0\r\n $contactmethods['twitter'] = 'Twitter';\r\n \u00a0 unset($contactmethods['yim']);\r\n \u00a0 unset($contactmethods['aim']);\r\n \u00a0 unset($contactmethods['jabber']);\r\n return $contactmethods;\r\n }\r\n add_filter('user_contactmethods','edit_contactmethods',10,1);<\/pre>\n<p>&nbsp;<\/p>\n<p>Here\u2019s the result:<\/p>\n<p><a rel=\"lightbox[72627]\" class=\"blog-thumbnail\" href=\"https:\/\/wpmudev.com\/blog\/remove-aim-yahoo-and-jabber-fields-from-the-wordpress-profile-page\/facebook-twitter\/\" rel=\"attachment wp-att-72630\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-72630\" title=\"facebook-twitter\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/02\/facebook-twitter.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"673\" height=\"307\" \/><\/a> <\/p>\n<p>As you can see, there\u2019s not much to it, and so if you wanted to edit this code to leave one of the fields in, you could easily do it by removing one of the \u201cunset\u201d lines. For example, if you wanted to leave the Jabber field in, then you would remove the following line from the code:<\/p>\n<pre>unset($contactmethods['jabber']);<\/pre>\n<p>Likewise, it\u2019s probably also not hard to see how the Twitter and Facebook fields are added. And so if you wanted to add another field for something else, you easily do that to. Just copy the Facebook line of code, for example, and change the labels on it in both spots.<\/p>\n<p>As an example, let\u2019s add a field called \u201cWhatever.\u201d This would be the entire code:<\/p>\n<pre>\u00a0function edit_contactmethods( $contactmethods ) {\r\n \u00a0\u00a0$contactmethods['facebook'] = 'Facebook';\u00a0\r\n \u00a0\u00a0$contactmethods['twitter'] = 'Twitter';\r\n \u00a0\u00a0$contactmethods['whatever'] = 'Whatever';\r\n \u00a0 unset($contactmethods['yim']);\r\n \u00a0 unset($contactmethods['aim']);\r\n \u00a0 unset($contactmethods['jabber']);\r\n return $contactmethods;\r\n }\r\n add_filter('user_contactmethods','edit_contactmethods',10,1);<\/pre>\n<p>And here\u2019s the result with the new \u201cWhatever\u201d field.<\/p>\n<p><a rel=\"lightbox[72627]\" class=\"blog-thumbnail\" href=\"https:\/\/wpmudev.com\/blog\/remove-aim-yahoo-and-jabber-fields-from-the-wordpress-profile-page\/whatever\/\" rel=\"attachment wp-att-72631\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-72631\" title=\"whatever\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2012\/02\/whatever.jpg\" alt=\"Post image\" aria-hidden=\"true\" width=\"673\" height=\"307\" \/><\/a><\/p>\n<h2><strong>Make Your Own Plugin<\/strong><\/h2>\n<p>As mentioned in a previous post, when you have snippets of code like this to be put into your functions file, you can easily turn them into super simple plugins instead. If you\u2019d like to do that, you can <a href=\"https:\/\/wpmudev.com\/blog\/wordpress-plugin-development-guide\/\" target=\"_blank\">read more here<\/a>.<\/p>\n<p>Photo: <a href=\"http:\/\/www.bigstockphoto.com\/image-16956656\/stock-vector-vector-scissors-cutting-sticker\" target=\"_blank\">vector scissors cutting sticker<\/a> from BigStock<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Eliminate some clutter from your profile page and add Facebook and Twitter fields instead.<\/p>\n","protected":false},"author":84404,"featured_media":199252,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[4],"tags":[795,5194],"tutorials_categories":[],"class_list":["post-72627","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-plugins","tag-facebook","tag-profiles"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/72627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/84404"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=72627"}],"version-history":[{"count":2,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/72627\/revisions"}],"predecessor-version":[{"id":198470,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/72627\/revisions\/198470"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/199252"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=72627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=72627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=72627"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=72627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}