2011-04-20 17:46:33 -04:00
|
|
|
<?php
|
|
|
|
/**
|
2013-09-25 12:50:11 -04:00
|
|
|
* Template for displaying Author Archive pages
|
2011-05-02 17:04:44 -04:00
|
|
|
*
|
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
|
2013-10-09 16:39:09 -04:00
|
|
|
/*
|
2013-09-25 12:50:11 -04:00
|
|
|
* Queue the first post, that way we know what author
|
|
|
|
* we're dealing with (if that is the case).
|
2011-05-04 18:54:50 -04:00
|
|
|
*
|
2013-09-25 12:50:11 -04:00
|
|
|
* We reset this later so we can run the loop properly
|
|
|
|
* with a call to rewind_posts().
|
2011-05-04 18:54:50 -04:00
|
|
|
*/
|
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">
|
2019-07-05 04:04:57 -04:00
|
|
|
<h1 class="page-title author">
|
|
|
|
<?php
|
2019-09-02 20:41:05 -04:00
|
|
|
/* translators: %s: Author display name. */
|
2022-11-26 17:39:10 -05:00
|
|
|
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' ) ) ) . '" rel="me">' . get_the_author() . '</a></span>' );
|
2019-07-05 04:04:57 -04:00
|
|
|
?>
|
|
|
|
</h1>
|
2011-04-20 17:46:33 -04:00
|
|
|
</header>
|
|
|
|
|
2011-05-04 18:54:50 -04:00
|
|
|
<?php
|
2013-10-09 16:39:09 -04:00
|
|
|
/*
|
2020-01-28 19:45:18 -05:00
|
|
|
* 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.
|
2011-05-04 18:54:50 -04:00
|
|
|
*/
|
|
|
|
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.
|
2017-11-30 18:11:00 -05:00
|
|
|
if ( get_the_author_meta( 'description' ) ) :
|
2018-08-16 21:51:36 -04:00
|
|
|
?>
|
2011-04-20 17:46:33 -04:00
|
|
|
<div id="author-info">
|
|
|
|
<div id="author-avatar">
|
2013-09-25 12:50:11 -04:00
|
|
|
<?php
|
|
|
|
/**
|
2020-08-10 20:34:08 -04:00
|
|
|
* Filters the Twenty Eleven author bio avatar size.
|
2013-09-25 12:50:11 -04:00
|
|
|
*
|
|
|
|
* @since Twenty Eleven 1.0
|
|
|
|
*
|
|
|
|
* @param int The height and width avatar dimension in pixels. Default 60.
|
|
|
|
*/
|
2019-09-10 15:23:55 -04:00
|
|
|
$author_bio_avatar_size = apply_filters( 'twentyeleven_author_bio_avatar_size', 60 );
|
|
|
|
echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
|
2013-09-25 12:50:11 -04:00
|
|
|
?>
|
2011-04-20 17:46:33 -04:00
|
|
|
</div><!-- #author-avatar -->
|
|
|
|
<div id="author-description">
|
2019-07-05 04:04:57 -04:00
|
|
|
<h2>
|
|
|
|
<?php
|
2019-09-02 20:41:05 -04:00
|
|
|
/* translators: Author display name. */
|
2019-07-05 04:04:57 -04:00
|
|
|
printf( __( 'About %s', 'twentyeleven' ), get_the_author() );
|
|
|
|
?>
|
|
|
|
</h2>
|
2011-04-20 17:46:33 -04:00
|
|
|
<?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
|
|
|
|
2017-11-30 18:11:00 -05:00
|
|
|
<?php
|
2020-01-28 19:45:18 -05:00
|
|
|
// Start the Loop.
|
2017-11-30 18:11:00 -05:00
|
|
|
while ( have_posts() ) :
|
|
|
|
the_post();
|
2018-08-16 21:51:36 -04:00
|
|
|
?>
|
2011-04-20 17:46:33 -04:00
|
|
|
|
2011-05-04 18:54:50 -04:00
|
|
|
<?php
|
2013-10-09 16:39:09 -04:00
|
|
|
/*
|
2013-09-25 12:50:11 -04:00
|
|
|
* Include the Post-Format-specific template for the content.
|
2011-05-04 18:54:50 -04:00
|
|
|
* If you want to overload this in a child theme then include a file
|
2020-01-28 19:45:18 -05: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(); ?>
|
2017-11-30 18:11:00 -05:00
|
|
|
<?php get_footer(); ?>
|