Definition:
function get_user_meta($user_id, $key = '', $single = false) {}
Retrieve user meta field for a user.
Parameters
- int $user_id: Post ID.
- string $key: The meta key to retrieve.
- bool $single: Whether to return a single value.
Return values
returns:Will be an array if $single is false. Will be value of meta data field if $single is true.
Source code
function get_user_meta($user_id, $key = '', $single = false) { return get_metadata('user', $user_id, $key, $single); }
1899
hi,
i use this function, but the return value is null..
my code:
$post_ids = get_user_meta(2,’user_favourite_post’);
any help