How to Rewrite Author Name on Post For a Guest Author

Ever want to post an article submitted to your blog by someone else? Here’s an easy way to post it yourself as admin and rewrite the author name to whatever you want on a case by case basis. Add this to your single.php and/or page.php file where you want the author name to show up:

{code type=php}
ID, “guest-author”, true);
if ($author != “”) {
echo $author;
} else {
} ?>

Ordinarily you would just replace this tag with the above code:

{code type=php}

Now, when you want to add a guest author’s name to the post, simply create a custom field called guest-author and add the name of the author as the value of the field.

Source: WP Recipes