Check to see we have posts before calling the_post().

git-svn-id: https://develop.svn.wordpress.org/trunk@14830 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2010-05-24 08:40:02 +00:00
parent d83e614ab5
commit aeca45f369
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@
* We reset this later so we can run the loop
* properly with a call to rewind_posts().
*/
the_post();
if ( have_posts() )
the_post();
?>
<h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyten' ), "<span class='vcard'><a class='url fn n' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a></span>" ); ?></h1>