-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcategory.php
50 lines (34 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
<?php get_header(); ?>
<!--BEGIN: sidebar~main-->
<aside class="sidebar-main">
<p>Main Sidebar</p>
<?php dynamic_sidebar('sidebar-main'); ?>
</aside>
<?php endif; ?>
<!--END: sidebar~main-->
<!--BEGIN: Content-->
<div class="content-main clear-fix" role="main">
<?php if (have_posts()) : ?>
<h1>Posts in <?php single_cat_title(); ?></h1>
<?php while (have_posts()) : the_post(); ?>
<!--BEGIN: Post-->
<article <?php post_class() ?> class="post-<?php the_ID(); ?>">
<h2 class="alt"><a href="<?php the_permalink(); ?>" rel="bookmark" title='Click to read: "<?php strip_tags(the_title()); ?>"'><?php the_title(); ?></a></h2>
<p>by <?php the_author(); ?></p>
<p class="post-date"><?php the_time('F jS, Y') ?> — <?php the_category(', ') ?></p>
<p><?php the_tags('Topics Covered: ', ', ', '<br />'); ?></p>
<p><?php the_excerpt("Continue reading →"); ?></p>
</article>
<!--END: Post-->
<?php endwhile; else : ?>
<h2>No posts were found :(</h2>
<?php endif; //END: The Loop ?>
<?php // we use the pagenavi plugin for pagination, there's a check here so if it doesn't exist it won't cuase an error
if(function_exists('wp_pagenavi')) :
wp_pagenavi();
wp_reset_postdata(); // avoid errors further down the page
endif;
?>
</div>
<!--END: Content-->
<?php get_footer(); ?>