2010-03-30 00:03:15 +02:00
|
|
|
<?php
|
|
|
|
/**
|
2013-09-25 19:04:10 +02:00
|
|
|
* Template for displaying Author Archive pages
|
2010-03-30 00:03:15 +02:00
|
|
|
*
|
|
|
|
* @package WordPress
|
2010-05-16 19:10:21 +02:00
|
|
|
* @subpackage Twenty_Ten
|
2010-05-17 08:36:11 +02:00
|
|
|
* @since Twenty Ten 1.0
|
2010-03-30 00:03:15 +02:00
|
|
|
*/
|
|
|
|
|
2010-06-11 18:55:41 +02:00
|
|
|
get_header(); ?>
|
2010-02-08 19:02:23 +01:00
|
|
|
|
|
|
|
<div id="container">
|
2010-05-10 23:10:12 +02:00
|
|
|
<div id="content" role="main">
|
2010-02-08 19:02:23 +01:00
|
|
|
|
2010-05-17 08:36:11 +02:00
|
|
|
<?php
|
2013-10-09 22:39:09 +02:00
|
|
|
/*
|
2013-09-25 19:04:10 +02:00
|
|
|
* Queue the first post, that way we know who
|
2010-05-17 08:36:11 +02:00
|
|
|
* the author is when we try to get their name,
|
|
|
|
* URL, description, avatar, etc.
|
|
|
|
*
|
|
|
|
* We reset this later so we can run the loop
|
|
|
|
* properly with a call to rewind_posts().
|
|
|
|
*/
|
2017-12-01 00:11:00 +01:00
|
|
|
if ( have_posts() ) {
|
|
|
|
the_post();
|
|
|
|
}
|
2010-05-17 08:36:11 +02:00
|
|
|
?>
|
2010-02-08 19:02:23 +01:00
|
|
|
|
2019-07-09 03:10:00 +02:00
|
|
|
<h1 class="page-title author">
|
|
|
|
<?php
|
2019-09-03 02:41:05 +02:00
|
|
|
/* translators: %s: Author display name. */
|
2019-07-09 03:10:00 +02:00
|
|
|
printf( __( 'Author Archives: %s', 'twentyten' ), '<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>
|
2010-02-07 17:16:26 +01:00
|
|
|
|
2010-05-17 08:36:11 +02:00
|
|
|
<?php
|
|
|
|
// If a user has filled out their description, show a bio on their entries.
|
2017-12-01 00:11:00 +01:00
|
|
|
if ( get_the_author_meta( 'description' ) ) :
|
2018-08-17 03:51:36 +02:00
|
|
|
?>
|
2010-02-07 17:16:26 +01:00
|
|
|
<div id="entry-author-info">
|
|
|
|
<div id="author-avatar">
|
2013-09-25 19:04:10 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Filter the Twenty Ten author bio avatar size.
|
|
|
|
*
|
|
|
|
* @since Twenty Ten 1.0
|
|
|
|
*
|
|
|
|
* @param int The height and width avatar dimensions in pixels. Default 60.
|
|
|
|
*/
|
2019-09-10 21:23:55 +02:00
|
|
|
$author_bio_avatar_size = apply_filters( 'twentyten_author_bio_avatar_size', 60 );
|
|
|
|
echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
|
2013-09-25 19:04:10 +02:00
|
|
|
?>
|
2010-05-21 20:56:27 +02:00
|
|
|
</div><!-- #author-avatar -->
|
2010-02-07 17:16:26 +01:00
|
|
|
<div id="author-description">
|
2019-07-09 03:10:00 +02:00
|
|
|
<h2>
|
|
|
|
<?php
|
2019-09-03 02:41:05 +02:00
|
|
|
/* translators: %s: Author display name. */
|
2019-07-09 03:10:00 +02:00
|
|
|
printf( __( 'About %s', 'twentyten' ), get_the_author() );
|
|
|
|
?>
|
|
|
|
</h2>
|
2010-03-16 21:17:22 +01:00
|
|
|
<?php the_author_meta( 'description' ); ?>
|
2010-02-07 17:16:26 +01:00
|
|
|
</div><!-- #author-description -->
|
2010-05-21 20:56:27 +02:00
|
|
|
</div><!-- #entry-author-info -->
|
2010-02-07 17:16:26 +01:00
|
|
|
<?php endif; ?>
|
|
|
|
|
2010-03-25 23:04:27 +01:00
|
|
|
<?php
|
2013-10-09 22:39:09 +02:00
|
|
|
/*
|
2020-01-29 01:45:18 +01: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.
|
2010-05-17 08:36:11 +02:00
|
|
|
*/
|
|
|
|
rewind_posts();
|
|
|
|
|
2013-10-09 22:39:09 +02:00
|
|
|
/*
|
2013-09-25 19:04:10 +02:00
|
|
|
* Run the loop for the author archive page to output the authors posts
|
2010-03-25 23:04:27 +01:00
|
|
|
* If you want to overload this in a child theme then include a file
|
|
|
|
* called loop-author.php and that will be used instead.
|
|
|
|
*/
|
2015-01-22 01:42:44 +01:00
|
|
|
get_template_part( 'loop', 'author' );
|
2010-03-25 23:04:27 +01:00
|
|
|
?>
|
2010-02-08 19:02:23 +01:00
|
|
|
</div><!-- #content -->
|
2010-02-07 17:16:26 +01:00
|
|
|
</div><!-- #container -->
|
2010-02-08 19:02:23 +01:00
|
|
|
|
|
|
|
<?php get_sidebar(); ?>
|
2010-03-16 21:17:22 +01:00
|
|
|
<?php get_footer(); ?>
|