How to get the user description with get_users?

Question

I’m using this piece of code to list users and their information. The problem I’m having is that the description isn’t showing. Obviously it’s because the description lays under “user_meta” and not “users”. But how would I solve that?

<?php
    $blogusers = get_users('include=2,3,4,5,6,7,8');
    foreach ($blogusers as $user) {
        echo '<li>'
        . get_avatar($user->ID, 120) .
        '<br />'
        . $user->display_name .
        '<br />'
        . $user->user_email .
        '<br />'
        . $user->user_description .
        '</li>';
    }
?>
0
, nicolas 4 years 2020-03-11T04:52:30-05:00 0 Answers 101 views 0

Leave an answer

Browse
Browse