Fields in User Profile Page

For a quick solution put this code in functions.php of your theme: add_action( ‘show_user_profile’, ‘show_extra_profile_fields’, 10 ); add_action( ‘edit_user_profile’, ‘show_extra_profile_fields’, 10 ); function show_extra_profile_fields( $user ) { ?> <input type=”text” name=”twitter” value=”<?php echo esc_attr( get_the_author_meta( ‘twitter’, $user->ID ) ); ?>” /> <?php } Or you could do it with a plugin: http://www.cozmoslabs.com/wordpress-profile-builder/

Multiple Unique Author Profiles

You could register a user_meta field (probably a dropdown) and use that to select templates. You will still need to use if statements to differentiate the templates, but you’re going to need that regardless of the route you take. If you use get_template_part() you can split out the actual html and such of it and … Read more

Is there a way to make custom fields only editable by administrators?

<input type=”text” name=”facility” id=”facility” value=”<?php echo esc_attr( get_the_author_meta( ‘facility’, $user->ID ) ); ?>” <?php if (!is_admin()) { echo ‘disabled=”disabled”‘; } class=”regular-text” /><br /> <span class=”description”><?php _e(“Please enter the facility name.”); ?></span> Add this third line to all your inputs that you don’t want the non-admins to edit.

Maintain user profile data in a non-WordPress database

You can use the WPDB class to instantiate an external DB. Looks like roughly this: define(‘EXT_DB_USER’, ‘username’); define(‘EXT_DB_PASSWORD’, ‘password’); define(‘EXT_DB_NAME’, ‘ext_data’ ); define(‘EXT_DB_HOST’, ‘123.123.123.123:3307′); $wpdb_ext = new wpdb(EXT_DB_USER, EXT_DB_PASSWORD, EXT_DB_NAME, EXT_DB_HOST); then you just call $wpdb_ext with normal WP functions just like you would #wpdb. For log in info it’s usually easiest to sync login … Read more