-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcategory.php
56 lines (47 loc) · 1.32 KB
/
category.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* The template for displaying Category pages
*
* @link http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
*/
get_header();
?>
<div class="page-title">
<h1><span>Category:</span> <?php printf( single_cat_title( '', false ) ); ?></h1>
</div>
<div class="content-wide" role="main">
<div class="category-description">
<?php print apply_filters( 'the_content', category_description() ); ?>
</div>
<div class="anthem-listing">
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post();
$categories = get_the_category();
$cat = $categories[0];
$color = get_category_color( $cat->term_id );
?>
<div class="entry">
<div class="entry-thumbnail">
<a href="<?php the_permalink() ?>"><?php the_post_thumbnail( null, array( 768, 480 ) ); ?></a>
<div class="entry-category <?php print $cat->slug ?> <?php print $color ?>"><?php print $cat->name ?></div>
</div>
<div class="entry-inner">
<h4><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h4>
<?php the_excerpt(); ?>
</div>
</div>
<?php
endwhile;
endif;
?>
</div>
</div><!-- #content -->
<?php pagination(); ?>
<?php
get_footer();
?>