-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcategory.php
More file actions
43 lines (34 loc) · 1.02 KB
/
category.php
File metadata and controls
43 lines (34 loc) · 1.02 KB
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
<?php get_header(); ?>
<div class="container">
<h1 class="cat">Posted In: <em><?php single_cat_title(); ?></em></h1>
<?php
if ( have_posts() ) :
while ( have_posts() ):
the_post();
$stripe = ($stripe == 'dark') ? 'bright' : 'dark';
?>
<div class="post <?php echo $stripe; ?> row entry">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail('large', array('class' => 'img-responsive'));
}
?>
<ul class="info">
<li>Posted in: <em><?php the_category(', ') ;?></em></li>
<li>Written by: <?php the_author( );?></li>
<li>On: <?php the_time('l, F jS, Y'); ?></li>
</ul>
<div class="container excerpt">
<?php the_excerpt(); ?>
</div>
<p><a class= "post-link" href="<?php the_permalink() ;?>">Continue Reading →</a></p>
</div>
<?php
endwhile;
else:
?>
<p>“Sorry, there are no posts.”</p>
<?php endif; ?>
</div>
<?php get_footer(); ?>