-
Notifications
You must be signed in to change notification settings - Fork 11
/
author.php
executable file
·48 lines (43 loc) · 1.06 KB
/
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
44
45
46
47
48
<?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();
?>
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
<header class="page-header">
<h1 class="page-title author">
<?php
printf( esc_html__( 'Author Archives: %s', 'my-theme' ), get_the_author() );
?>
</h1>
</header>
</div><!-- /.mdc-cell -->
<div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
<?php
get_template_part( 'author', 'bio' );
?>
</div><!-- /.mdc-cell -->
<?php
/**
* 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();