This filter returns the HTML that displays your post author along with your blog posts.

You can use this filter to completely overwrite the HTML given, or even add to it.

Add an Icon

For example, if you wanted to add an author icon before your author name, you could do this:

add_filter( 'generate_post_author_output', function( $output ) {  
    return '<i class="fa fa-user-circle" aria-hidden="true"></i> ' . $output; 
} );

Remove from Post Type

Another example is if you want to remove the author on a specific post type, but keep it elsewhere:

add_filter( 'generate_post_author_output', function( $output ) {
    // If we're on our "my-post-type" post type, remove the author.     
    if ( is_post_type_archive( 'my-post-type' ) || 'my-post-type' == get_post_type() ) {
        return '';

    // Otherwise, display it.
    return $output;
} );

Custom Author Name

One more example is if you want to completely customize your author name and link:

add_filter( 'generate_post_author_output', function( $output ) {    
    return '<a href="MY CUSTOM URL">My Name</a>';
} );

Remove Link

Lastly, if you want to remove the link from the author:

add_filter( 'generate_post_author_output', function() {
    printf( ' <span class="byline">%1$s</span>',
        sprintf( '<span class="author vcard" itemtype="" itemscope="itemscope" itemprop="author">%1$s <span class="fn n author-name" itemprop="name">%4$s</span></span>',
            __( 'by','generatepress'),
            esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
            esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ),
            get_the_author() ) ),
            esc_html( get_the_author() )
} );