Show the title of the latest post by author

You can get the latest post of an author adding the following code to your function:

$latest_post = get_posts( array(
        'author'      => $id,
        'orderby'     => 'date',
        'numberposts' => 1
));

// Since get_posts() returns an array, but we know we only
// need one element, let's just get the element we need.
$latest_post = $latest_post[0];

Then modify your $output, adding the data you need (specifically guid for the permalink, and post_title for the title), for example:

$output .= "<div id='bloggers_latest_post'>
                <a href="https://wordpress.stackexchange.com/questions/95004/$latest_post->guid">$latest_post->post_title</a>
            </div>"

Leave a Comment