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 Archive pages |
|
4 |
* |
|
5 |
* Used to display archive-type pages if nothing more specific matches a query. |
|
6 |
* For example, puts together date-based pages if no date.php file exists. |
|
7 |
* |
|
8 |
* If you'd like to further customize these archive views, you may create a |
|
9 |
* new template file for each specific one. For example, Twenty Thirteen |
|
10 |
* already has tag.php for Tag archives, category.php for Category archives, |
|
11 |
* and author.php for Author archives. |
|
12 |
* |
|
10 | 13 |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/ |
0 | 14 |
* |
15 |
* @package WordPress |
|
16 |
* @subpackage Twenty_Thirteen |
|
17 |
* @since Twenty Thirteen 1.0 |
|
18 |
*/ |
|
19 |
||
20 |
get_header(); ?> |
|
21 |
||
22 |
<div id="primary" class="content-area"> |
|
23 |
<div id="content" class="site-content" role="main"> |
|
24 |
||
25 |
<?php if ( have_posts() ) : ?> |
|
26 |
<header class="archive-header"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
27 |
<h1 class="archive-title"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
28 |
<?php |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
29 |
if ( is_day() ) : |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
30 |
printf( __( 'Daily Archives: %s', 'twentythirteen' ), get_the_date() ); |
0 | 31 |
elseif ( is_month() ) : |
32 |
printf( __( 'Monthly Archives: %s', 'twentythirteen' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentythirteen' ) ) ); |
|
33 |
elseif ( is_year() ) : |
|
34 |
printf( __( 'Yearly Archives: %s', 'twentythirteen' ), get_the_date( _x( 'Y', 'yearly archives date format', 'twentythirteen' ) ) ); |
|
35 |
else : |
|
36 |
_e( 'Archives', 'twentythirteen' ); |
|
37 |
endif; |
|
10 | 38 |
?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
39 |
</h1> |
0 | 40 |
</header><!-- .archive-header --> |
41 |
||
42 |
<?php /* The loop */ ?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
43 |
<?php |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
44 |
while ( have_posts() ) : |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
45 |
the_post(); |
10 | 46 |
?> |
0 | 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(); ?> |
|
5 | 60 |
<?php get_footer(); ?> |