From 461976d48cc4e881e9b52f578faa7606654b62ad Mon Sep 17 00:00:00 2001 From: Konstantin Kovshenin Date: Fri, 31 Aug 2012 08:54:22 +0400 Subject: [PATCH] Revert "Merge pull request #36 from kovshenin/patch-5" This reverts commit 800b9ebcd1784bfb60b0e2887805911c19688418, reversing changes made to ce4bef6129b42306e2446be5a665639e92f9ca0e. --- archive.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/archive.php b/archive.php index 812c1d0a..9542a31e 100644 --- a/archive.php +++ b/archive.php @@ -25,9 +25,16 @@ get_header(); ?> printf( __( 'Tag Archives: %s', '_s' ), '' . single_tag_title( '', false ) . '' ); } elseif ( is_author() ) { - // Get the queried author data. - $author = get_queried_object(); - printf( __( 'Author Archives: %s', '_s' ), '' . esc_html( $author->display_name ) . '' ); + /* Queue the first post, that way we know + * what author we're dealing with (if that is the case). + */ + the_post(); + printf( __( 'Author Archives: %s', '_s' ), '' . get_the_author() . '' ); + /* Since we called the_post() above, we need to + * rewind the loop back to the beginning that way + * we can run the loop properly, in full. + */ + rewind_posts(); } elseif ( is_day() ) { printf( __( 'Daily Archives: %s', '_s' ), '' . get_the_date() . '' );