Tag Info

Hot answers tagged

1

Try this: global $current_user; $user_id = $current_user->ID; // current user ID $meta = get_user_meta( $user_id, 'title', 'Manager' ); // subject meta if($meta != '') // updates meta if exists update_user_meta($user_id, 'title', 'Manager'); else // creates new meta if not exists add_user_meta($user_id, 'title', 'Manager');



Only top voted, non community-wiki answers of a minimum length are eligible