-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathauthor.php
executable file
·43 lines (37 loc) · 876 Bytes
/
author.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* The Template for displaying Author pages.
*/
get_header();
if ( have_posts() ) :
/**
* Queue the first post, that way we know
* what author we're dealing with (if that is the case).
*
* We reset this later so we can run the loop
* properly with a call to rewind_posts().
*/
the_post();
?>
<header class="page-header">
<h1 class="page-title author">
<?php
printf( esc_html__( 'Author Archives: %s', 'my-theme' ), get_the_author() );
?>
</h1>
</header>
<?php
get_template_part( 'author', 'bio' );
/**
* 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();
get_template_part( 'archive', 'loop' );
else :
// 404.
get_template_part( 'content', 'none' );
endif;
wp_reset_postdata(); // End of the loop.
get_footer();