Created
February 28, 2013 09:39
-
-
Save chuckreynolds/5055527 to your computer and use it in GitHub Desktop.
Custom WordPress User Profile Fields. Who EVER fills out the yim/aim/jabber fields in their wordpress profile? not me and not clients lol... in this, it removes those three fields and adds twitter, facebook and google+ profile url fields. How to add those those new fields to the front end is included in comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add custom fields to user profiles | |
| function vuurr_sm_contactmethods( $contactmethods ) { | |
| // Add | |
| $contactmethods['twitter'] = 'Twitter'; | |
| $contactmethods['facebook'] = 'Facebook'; | |
| $contactmethods['googleplus'] = 'Google+ About'; | |
| // Remove | |
| unset($contactmethods['yim']); | |
| unset($contactmethods['aim']); | |
| unset($contactmethods['jabber']); | |
| return $contactmethods; | |
| } | |
| add_filter('user_contactmethods','vuurr_sm_contactmethods',10,1); | |
| /* add on front-end as <?php the_author_meta('twitter'); ?> */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment