Wordpress 3.6
[autoinstalls/wordpress.git] / wp-content / themes / twentythirteen / author.php
1 <?php
2 /**
3  * The template for displaying Author archive pages.
4  *
5  * Learn more: http://codex.wordpress.org/Template_Hierarchy
6  *
7  * @package WordPress
8  * @subpackage Twenty_Thirteen
9  * @since Twenty Thirteen 1.0
10  */
11
12 get_header(); ?>
13
14         <div id="primary" class="content-area">
15                 <div id="content" class="site-content" role="main">
16
17                 <?php if ( have_posts() ) : ?>
18
19                         <?php
20                                 /* Queue the first post, that way we know
21                                  * what author we're dealing with (if that is the case).
22                                  *
23                                  * We reset this later so we can run the loop
24                                  * properly with a call to rewind_posts().
25                                  */
26                                 the_post();
27                         ?>
28
29                         <header class="archive-header">
30                                 <h1 class="archive-title"><?php printf( __( 'All posts by %s', 'twentythirteen' ), '<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>
31                         </header><!-- .archive-header -->
32
33                         <?php
34                                 /* Since we called the_post() above, we need to
35                                  * rewind the loop back to the beginning that way
36                                  * we can run the loop properly, in full.
37                                  */
38                                 rewind_posts();
39                         ?>
40
41                         <?php if ( get_the_author_meta( 'description' ) ) : ?>
42                                 <?php get_template_part( 'author-bio' ); ?>
43                         <?php endif; ?>
44
45                         <?php /* The loop */ ?>
46                         <?php while ( have_posts() ) : the_post(); ?>
47                                 <?php get_template_part( 'content', get_post_format() ); ?>
48                         <?php endwhile; ?>
49
50                         <?php twentythirteen_paging_nav(); ?>
51
52                 <?php else : ?>
53                         <?php get_template_part( 'content', 'none' ); ?>
54                 <?php endif; ?>
55
56                 </div><!-- #content -->
57         </div><!-- #primary -->
58
59 <?php get_sidebar(); ?>
60 <?php get_footer(); ?>