2011-04-20 17:46:33 -04:00
|
|
|
<?php
|
|
|
|
/**
|
2011-05-02 17:04:44 -04:00
|
|
|
* The template for displaying Author Archive pages.
|
|
|
|
*
|
2011-04-20 17:46:33 -04:00
|
|
|
* @package WordPress
|
2011-05-18 15:06:09 -04:00
|
|
|
* @subpackage Twenty_Eleven
|
2011-05-02 17:04:44 -04:00
|
|
|
* @since Twenty Eleven 1.0
|
2011-04-20 17:46:33 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
get_header(); ?>
|
|
|
|
|
|
|
|
<section id="primary">
|
|
|
|
<div id="content" role="main">
|
|
|
|
|
2011-06-12 13:43:03 -04:00
|
|
|
<?php if ( have_posts() ) : ?>
|
|
|
|
|
2011-05-04 18:54:50 -04:00
|
|
|
<?php
|
|
|
|
/* Queue the first post, that way we know
|
2011-06-10 19:01:16 -04:00
|
|
|
* what author we're dealing with (if that is the case).
|
2011-05-04 18:54:50 -04:00
|
|
|
*
|
|
|
|
* We reset this later so we can run the loop
|
|
|
|
* properly with a call to rewind_posts().
|
|
|
|
*/
|
2011-06-12 13:43:03 -04:00
|
|
|
the_post();
|
2011-05-04 18:54:50 -04:00
|
|
|
?>
|
2011-04-20 17:46:33 -04:00
|
|
|
|
|
|
|
<header class="page-header">
|
2011-06-10 17:57:18 -04:00
|
|
|
<h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
|
2011-04-20 17:46:33 -04:00
|
|
|
</header>
|
|
|
|
|
2011-05-04 18:54:50 -04:00
|
|
|
<?php
|
|
|
|
/* 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();
|
|
|
|
?>
|
2011-04-20 17:46:33 -04:00
|
|
|
|
|
|
|
<?php twentyeleven_content_nav( 'nav-above' ); ?>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
// If a user has filled out their description, show a bio on their entries.
|
|
|
|
if ( get_the_author_meta( 'description' ) ) : ?>
|
|
|
|
<div id="author-info">
|
|
|
|
<div id="author-avatar">
|
|
|
|
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 60 ) ); ?>
|
|
|
|
</div><!-- #author-avatar -->
|
|
|
|
<div id="author-description">
|
|
|
|
<h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
|
|
|
|
<?php the_author_meta( 'description' ); ?>
|
|
|
|
</div><!-- #author-description -->
|
2012-02-21 00:44:31 -05:00
|
|
|
</div><!-- #author-info -->
|
2011-04-26 14:34:52 -04:00
|
|
|
<?php endif; ?>
|
2011-04-20 17:46:33 -04:00
|
|
|
|
|
|
|
<?php /* Start the Loop */ ?>
|
|
|
|
<?php while ( have_posts() ) : the_post(); ?>
|
|
|
|
|
2011-05-04 18:54:50 -04:00
|
|
|
<?php
|
|
|
|
/* Include the Post-Format-specific template for the content.
|
|
|
|
* If you want to overload this in a child theme then include a file
|
2011-05-06 13:58:41 -04:00
|
|
|
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
2011-05-04 18:54:50 -04:00
|
|
|
*/
|
|
|
|
get_template_part( 'content', get_post_format() );
|
|
|
|
?>
|
2011-04-20 17:46:33 -04:00
|
|
|
|
|
|
|
<?php endwhile; ?>
|
|
|
|
|
|
|
|
<?php twentyeleven_content_nav( 'nav-below' ); ?>
|
|
|
|
|
2011-06-12 13:43:03 -04:00
|
|
|
<?php else : ?>
|
|
|
|
|
|
|
|
<article id="post-0" class="post no-results not-found">
|
|
|
|
<header class="entry-header">
|
|
|
|
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
|
|
|
|
</header><!-- .entry-header -->
|
|
|
|
|
|
|
|
<div class="entry-content">
|
|
|
|
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
|
|
|
|
<?php get_search_form(); ?>
|
|
|
|
</div><!-- .entry-content -->
|
|
|
|
</article><!-- #post-0 -->
|
|
|
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
2011-04-20 17:46:33 -04:00
|
|
|
</div><!-- #content -->
|
|
|
|
</section><!-- #primary -->
|
|
|
|
|
|
|
|
<?php get_sidebar(); ?>
|
|
|
|
<?php get_footer(); ?>
|