Monday, March 5, 2012

Add Custom field in User Profile

add_action( 'show_user_profile', 'my_show_extra_profile_fields' );
add_action( 'edit_user_profile', 'my_show_extra_profile_fields' );

function my_show_extra_profile_fields( $user ) { ?>

Extra profile information














Please enter your Twitter username.

//
------------------------------------------------------------------------------------------saving fields----------------------------------------------------
add_action( 'personal_options_update', 'my_save_extra_profile_fields' );
add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' );

function my_save_extra_profile_fields( $user_id ) {

if ( !current_user_can( 'edit_user', $user_id ) )
return false;

/* Copy and paste this line for additional fields. Make sure to change 'twitter' to the field ID. */
update_usermeta( $user_id, 'twitter', $_POST['twitter'] );
}
//-----------------------------------------------------------------------------------------usage-----------------------------------------------------------------
//the_author_meta( $meta_key, $user_id );
?>

Google (SEO) Search Engine Optimization

A great site is useless unless people know where to find you. This is where search engine optimization services come in handy. The methods used to keep your site in the top pages of Google for a long time will depend on if you know how Google ranks it index. Since only the engineers employed by Google know the answer, it is up to the rest of us to speculate on what may work, and what we know doesn't work.