wp get user meta
<?php
$meta_data = get_user_meta($user_id, $key, $single);
?>
wp get user meta
<?php
$meta_data = get_user_meta($user_id, $key, $single);
?>
get_user_meta
global $current_user;
get_currentuserinfo();
if ( $current_user ) {
$permission = get_user_meta( $current_user->ID, 'some_meta' , true );
if ( ! empty( $permission ) ) {
// do stuff
}
}
// works for both array and single values
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us