I am using this filter to display guest author on post, but i want guest author's posts to appear in the author.php
template also.
This is my guest author code (inside functions.php
).
<?php
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;
}
?>
...and here is the author template: http://codex.wordpress.org/Author_Templates#Sample_Template_File
author.php
template..