author | ymh <ymh.work@gmail.com> |
Mon, 14 Oct 2019 17:39:30 +0200 | |
changeset 7 | cf61fcea0001 |
parent 5 | 5e2f62d02dcd |
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 Twelve already |
|
10 |
* has tag.php for Tag archives, category.php for Category archives, and |
|
11 |
* author.php for Author archives. |
|
12 |
* |
|
5 | 13 |
* @link https://codex.wordpress.org/Template_Hierarchy |
0 | 14 |
* |
15 |
* @package WordPress |
|
16 |
* @subpackage Twenty_Twelve |
|
17 |
* @since Twenty Twelve 1.0 |
|
18 |
*/ |
|
19 |
||
20 |
get_header(); ?> |
|
21 |
||
22 |
<section id="primary" class="site-content"> |
|
23 |
<div id="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', 'twentytwelve' ), '<span>' . get_the_date() . '</span>' ); |
0 | 31 |
elseif ( is_month() ) : |
32 |
printf( __( 'Monthly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentytwelve' ) ) . '</span>' ); |
|
33 |
elseif ( is_year() ) : |
|
34 |
printf( __( 'Yearly Archives: %s', 'twentytwelve' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '</span>' ); |
|
35 |
else : |
|
36 |
_e( 'Archives', 'twentytwelve' ); |
|
37 |
endif; |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
38 |
?> |
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 |
|
43 |
/* Start the Loop */ |
|
7
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(); |
0 | 46 |
|
47 |
/* Include the post format-specific template for the content. If you want to |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
48 |
* this in a child theme then include a file called content-___.php |
0 | 49 |
* (where ___ is the post format) and that will be used instead. |
50 |
*/ |
|
51 |
get_template_part( 'content', get_post_format() ); |
|
52 |
||
53 |
endwhile; |
|
54 |
||
55 |
twentytwelve_content_nav( 'nav-below' ); |
|
56 |
?> |
|
57 |
||
58 |
<?php else : ?> |
|
59 |
<?php get_template_part( 'content', 'none' ); ?> |
|
60 |
<?php endif; ?> |
|
61 |
||
62 |
</div><!-- #content --> |
|
63 |
</section><!-- #primary --> |
|
64 |
||
65 |
<?php get_sidebar(); ?> |
|
5 | 66 |
<?php get_footer(); ?> |