1 <?php |
|
2 /** |
|
3 * The template for displaying Author archive pages |
|
4 * |
|
5 * @link https://codex.wordpress.org/Template_Hierarchy |
|
6 * |
|
7 * @package WordPress |
|
8 * @subpackage Twenty_Fourteen |
|
9 * @since Twenty Fourteen 1.0 |
|
10 */ |
|
11 |
|
12 get_header(); ?> |
|
13 |
|
14 <section id="primary" class="content-area"> |
|
15 <div id="content" class="site-content" role="main"> |
|
16 |
|
17 <?php if ( have_posts() ) : ?> |
|
18 |
|
19 <header class="archive-header"> |
|
20 <h1 class="archive-title"> |
|
21 <?php |
|
22 /* |
|
23 * Queue the first post, that way we know what author |
|
24 * we're dealing with (if that is the case). |
|
25 * |
|
26 * We reset this later so we can run the loop properly |
|
27 * with a call to rewind_posts(). |
|
28 */ |
|
29 the_post(); |
|
30 |
|
31 printf( __( 'All posts by %s', 'twentyfourteen' ), get_the_author() ); |
|
32 ?> |
|
33 </h1> |
|
34 <?php if ( get_the_author_meta( 'description' ) ) : ?> |
|
35 <div class="author-description"><?php the_author_meta( 'description' ); ?></div> |
|
36 <?php endif; ?> |
|
37 </header><!-- .archive-header --> |
|
38 |
|
39 <?php |
|
40 /* |
|
41 * Since we called the_post() above, we need to rewind |
|
42 * the loop back to the beginning that way we can run |
|
43 * the loop properly, in full. |
|
44 */ |
|
45 rewind_posts(); |
|
46 |
|
47 // Start the Loop. |
|
48 while ( have_posts() ) : |
|
49 the_post(); |
|
50 |
|
51 /* |
|
52 * Include the post format-specific template for the content. If you want to |
|
53 * use this in a child theme, then include a file called content-___.php |
|
54 * (where ___ is the post format) and that will be used instead. |
|
55 */ |
|
56 get_template_part( 'content', get_post_format() ); |
|
57 |
|
58 endwhile; |
|
59 // Previous/next page navigation. |
|
60 twentyfourteen_paging_nav(); |
|
61 |
|
62 else : |
|
63 // If no content, include the "No posts found" template. |
|
64 get_template_part( 'content', 'none' ); |
|
65 |
|
66 endif; |
|
67 ?> |
|
68 |
|
69 </div><!-- #content --> |
|
70 </section><!-- #primary --> |
|
71 |
|
72 <?php |
|
73 get_sidebar( 'content' ); |
|
74 get_sidebar(); |
|
75 get_footer(); |
|