Family Encyclopedia >> Electronics

How to Display Guest Author Names in WordPress Using Custom Fields (No Extra Users Needed)

As a seasoned WordPress developer with years of experience optimizing blogs for guest contributions, I know the challenge of properly crediting guest authors without unnecessary workarounds. Many sites add author bio boxes above or below posts, yet the byline still displays the site owner. Creating new user accounts for one-off guests clutters your dashboard and adds maintenance headaches.

Instead, use this proven method to override the author name via a simple custom field—efficient, clean, and scalable for high-traffic sites.

Open your active theme's functions.php file and add this code snippet:

add_filter( 'the_author', 'guest_author_name' );
add_filter( 'get_the_author_display_name', 'guest_author_name' );

function guest_author_name( $name ) {
    global $post;
    $author = get_post_meta( $post->ID, 'guest-author', true );
    if ( $author ) {
        $name = $author;
    }
    return $name;
}

For any guest post, add a custom field named guest-author with the true author's name. Publish, and the byline updates automatically.

Example:

How to Display Guest Author Names in WordPress Using Custom Fields (No Extra Users Needed)