author | ymh <ymh.work@gmail.com> |
Mon, 14 Oct 2019 18:30:03 +0200 | |
changeset 10 | 372f2766ea20 |
parent 7 | cf61fcea0001 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/** |
|
3 |
* The template for displaying Author archive pages |
|
4 |
* |
|
10 | 5 |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/ |
0 | 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 |
/* |
|
21 |
* Queue the first post, that way we know what author |
|
22 |
* we're dealing with (if that is the case). |
|
23 |
* |
|
24 |
* We reset this later so we can run the loop |
|
25 |
* properly with a call to rewind_posts(). |
|
26 |
*/ |
|
27 |
the_post(); |
|
28 |
?> |
|
29 |
||
30 |
<header class="archive-header"> |
|
31 |
<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> |
|
32 |
</header><!-- .archive-header --> |
|
33 |
||
34 |
<?php |
|
35 |
/* |
|
36 |
* Since we called the_post() above, we need to |
|
37 |
* rewind the loop back to the beginning that way |
|
38 |
* we can run the loop properly, in full. |
|
39 |
*/ |
|
40 |
rewind_posts(); |
|
41 |
?> |
|
42 |
||
43 |
<?php if ( get_the_author_meta( 'description' ) ) : ?> |
|
44 |
<?php get_template_part( 'author-bio' ); ?> |
|
45 |
<?php endif; ?> |
|
46 |
||
47 |
<?php /* The loop */ ?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
48 |
<?php |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
49 |
while ( have_posts() ) : |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
50 |
the_post(); |
10 | 51 |
?> |
0 | 52 |
<?php get_template_part( 'content', get_post_format() ); ?> |
53 |
<?php endwhile; ?> |
|
54 |
||
55 |
<?php twentythirteen_paging_nav(); ?> |
|
56 |
||
57 |
<?php else : ?> |
|
58 |
<?php get_template_part( 'content', 'none' ); ?> |
|
59 |
<?php endif; ?> |
|
60 |
||
61 |
</div><!-- #content --> |
|
62 |
</div><!-- #primary --> |
|
63 |
||
64 |
<?php get_sidebar(); ?> |
|
5 | 65 |
<?php get_footer(); ?> |