user metadata wordpress code example
Example 1: wp get user meta
<?php
$meta_data = get_user_meta($user_id, $key, $single);
?>
Example 2: add user meta
<?php
add_user_meta($user_id, $meta_key, $meta_value, $unique);
?>
<?php
$meta_data = get_user_meta($user_id, $key, $single);
?>
<?php
add_user_meta($user_id, $meta_key, $meta_value, $unique);
?>