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 Category pages |
|
4 |
* |
|
5 |
* Used to display archive-type pages for posts in a category. |
|
6 |
* |
|
5 | 7 |
* @link https://codex.wordpress.org/Template_Hierarchy |
0 | 8 |
* |
9 |
* @package WordPress |
|
10 |
* @subpackage Twenty_Twelve |
|
11 |
* @since Twenty Twelve 1.0 |
|
12 |
*/ |
|
13 |
||
14 |
get_header(); ?> |
|
15 |
||
16 |
<section id="primary" class="site-content"> |
|
17 |
<div id="content" role="main"> |
|
18 |
||
19 |
<?php if ( have_posts() ) : ?> |
|
20 |
<header class="archive-header"> |
|
21 |
<h1 class="archive-title"><?php printf( __( 'Category Archives: %s', 'twentytwelve' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h1> |
|
22 |
||
23 |
<?php if ( category_description() ) : // Show an optional category description ?> |
|
24 |
<div class="archive-meta"><?php echo category_description(); ?></div> |
|
25 |
<?php endif; ?> |
|
26 |
</header><!-- .archive-header --> |
|
27 |
||
28 |
<?php |
|
29 |
/* Start the Loop */ |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
30 |
while ( have_posts() ) : |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
31 |
the_post(); |
0 | 32 |
|
33 |
/* 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
|
34 |
* this in a child theme then include a file called content-___.php |
0 | 35 |
* (where ___ is the post format) and that will be used instead. |
36 |
*/ |
|
37 |
get_template_part( 'content', get_post_format() ); |
|
38 |
||
39 |
endwhile; |
|
40 |
||
41 |
twentytwelve_content_nav( 'nav-below' ); |
|
42 |
?> |
|
43 |
||
44 |
<?php else : ?> |
|
45 |
<?php get_template_part( 'content', 'none' ); ?> |
|
46 |
<?php endif; ?> |
|
47 |
||
48 |
</div><!-- #content --> |
|
49 |
</section><!-- #primary --> |
|
50 |
||
51 |
<?php get_sidebar(); ?> |
|
5 | 52 |
<?php get_footer(); ?> |