1 <?php |
|
2 /** |
|
3 * The template for displaying Category pages |
|
4 * |
|
5 * @link https://codex.wordpress.org/Template_Hierarchy |
|
6 * |
|
7 * @package WordPress |
|
8 * @subpackage Twenty_Fourteen |
|
9 * @since Twenty Fourteen 1.0 |
|
10 */ |
|
11 |
|
12 get_header(); ?> |
|
13 |
|
14 <section id="primary" class="content-area"> |
|
15 <div id="content" class="site-content" role="main"> |
|
16 |
|
17 <?php if ( have_posts() ) : ?> |
|
18 |
|
19 <header class="archive-header"> |
|
20 <h1 class="archive-title"><?php printf( __( 'Category Archives: %s', 'twentyfourteen' ), single_cat_title( '', false ) ); ?></h1> |
|
21 |
|
22 <?php |
|
23 // Show an optional term description. |
|
24 $term_description = term_description(); |
|
25 if ( ! empty( $term_description ) ) : |
|
26 printf( '<div class="taxonomy-description">%s</div>', $term_description ); |
|
27 endif; |
|
28 ?> |
|
29 </header><!-- .archive-header --> |
|
30 |
|
31 <?php |
|
32 // Start the Loop. |
|
33 while ( have_posts() ) : |
|
34 the_post(); |
|
35 |
|
36 /* |
|
37 * Include the post format-specific template for the content. If you want to |
|
38 * use this in a child theme, then include a file called content-___.php |
|
39 * (where ___ is the post format) and that will be used instead. |
|
40 */ |
|
41 get_template_part( 'content', get_post_format() ); |
|
42 |
|
43 endwhile; |
|
44 // Previous/next page navigation. |
|
45 twentyfourteen_paging_nav(); |
|
46 |
|
47 else : |
|
48 // If no content, include the "No posts found" template. |
|
49 get_template_part( 'content', 'none' ); |
|
50 |
|
51 endif; |
|
52 ?> |
|
53 </div><!-- #content --> |
|
54 </section><!-- #primary --> |
|
55 |
|
56 <?php |
|
57 get_sidebar( 'content' ); |
|
58 get_sidebar(); |
|
59 get_footer(); |
|