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

git-svn-id: http://svn.automattic.com/wordpress/trunk@14830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2010-05-24 08:40:02 +00:00
parent 437a09348b
commit 78ba3b94b1

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>