-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcategory.php
66 lines (52 loc) · 1.83 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
57
58
59
60
61
62
63
64
65
66
<?php
/**
* Template for various non-category archive pages (tag, term, date, etc.)
*/
get_header();
?>
<div class="clearfix">
<?php if ( have_posts() ) {
// queue up the first post so we know what type of archive page we're dealing with
the_post();
$title = single_cat_title( '', false );
$description = category_description();
$rss_link = get_category_feed_link( get_queried_object_id() );
$posts_term = of_get_option( 'posts_term_plural', 'Stories' );
?>
<header class="archive-background clearfix">
<?php
/*
* Show a label for the list of recent posts
* again, tailored to the type of page we're looking at
*/
printf( '<a class="rss-link rss-subscribe-link" href="%1$s">%2$s <i class="icon-rss"></i></a>', $rss_link, __( 'Subscribe', 'largo' ) );
echo '<h1 class="page-title">' . $title . '</h1>';
echo '<div class="archive-description">' . $description . '</div>';
// category pages show a list of related terms
if ( is_category() && largo_get_related_topics_for_category( get_queried_object() ) != '<ul></ul>' ) { ?>
<div class="related-topics">
<h5><?php _e('Related Topics:', 'largo'); ?> </h5>
<?php echo largo_get_related_topics_for_category( get_queried_object() ); ?>
</div>
<?php
}
?>
</header>
<div class="row-fluid clearfix">
<div class="stories span8" role="main" id="content">
<?php
// and finally wind the posts back so we can go through the loop as usual
rewind_posts();
while ( have_posts() ) : the_post();
get_template_part( 'partials/content', 'archive' );
endwhile;
largo_content_nav( 'nav-below' );
} else {
get_template_part( 'partials/content', 'not-found' );
}
?>
</div><!--#content-->
<?php get_sidebar(); ?>
</div>
</div>
<?php get_footer(); ?>