Display taxonomy or User meta

Support MB Group Display taxonomy or User meta

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2244
    MikelMikel
    Participant

    I have to get only the numbers ID

    #2250
    Anh TranAnh Tran
    Keymaster

    Can you please give more details? I'm not sure what you're going to do.

    #2257
    MikelMikel
    Participant

    Sorry, I have add de User meta box in meta group, but when I want to display de user name, only only appear the users ID

    $group_value = rwmb_meta( 'histor' );
    foreach( $group_value as &$v){
       echo "{$v['date']} {$v['user']}";
    }

    And is possible display user e-mail??

    Thank you very much

    #2258
    Anh TranAnh Tran
    Keymaster

    The user field stores only user ID. To get more info about the user, please use the function get_userdata:

    $group_value = rwmb_meta( 'histor' );
    foreach( $group_value as &$v){
       $user_id = $v['user'];
       $userdata = get_userdata( $user_id );
       echo "{$v['date']} {$userdata->user_login} {$userdata->user_email}";
    }
    #2262
    MikelMikel
    Participant

    Thank You Anh

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Display taxonomy or User meta’ is closed to new replies.