How to add author’s posts link (HTML + PHP) inside a function to output it

Try adding this line right after the one you mention:

$outputSlide .= '<a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '">' . get_the_author_meta( 'display_name' ) . '</a>';

Note change of the_author_meta() to get_the_author_meta(). the_author_meta() will echo the result, whereas get_the_author_meta() just gets the result which is added to the $outputSlide variable and returned as the last line in the function.

error code: 523