You can include “by [the author name]” in the Display Posts listing by adding include_author="true"
to your shortcode.
If you’d like to remove the “by” and only display the author name, add the code below to your theme’s functions.php file.
This code snippet goes in a core functionality plugin or Code Snippets.
/**
* Display Posts - Remove "by" from author name
*
* @param string $author Author.
*/
function be_dps_remove_by_author( $author ) {
$author = str_replace( '<span class="author">by ', '<span class="author">', $author );
return $author;
}
add_filter( 'display_posts_shortcode_author', 'be_dps_remove_by_author' );